feat(runtime): Allow lua to be used in colorschemes

* tests(runtime): move runtime/plugin tests to functional/lua/runtime_spec
This commit is contained in:
shadmansaleh
2021-06-02 09:32:37 +06:00
parent 687eb0b39f
commit 1e6c02510a
4 changed files with 95 additions and 49 deletions

View File

@@ -6438,6 +6438,10 @@ int load_colors(char_u *name)
apply_autocmds(EVENT_COLORSCHEMEPRE, name, curbuf->b_fname, false, curbuf);
snprintf((char *)buf, buflen, "colors/%s.vim", name);
retval = source_runtime(buf, DIP_START + DIP_OPT);
if (retval == FAIL) {
snprintf((char *)buf, buflen, "colors/%s.lua", name);
retval = source_runtime(buf, DIP_START + DIP_OPT);
}
xfree(buf);
apply_autocmds(EVENT_COLORSCHEME, name, curbuf->b_fname, FALSE, curbuf);