diff options
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r-- | src/nvim/ex_cmds2.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index 40259767ff..b37076c62e 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -729,13 +729,9 @@ void ex_compiler(exarg_T *eap) do_unlet(S_LEN("g:current_compiler"), true); do_unlet(S_LEN("b:current_compiler"), true); - snprintf(buf, bufsize, "compiler/%s.vim", eap->arg); - if (source_runtime(buf, DIP_ALL) == FAIL) { - // Try lua compiler - snprintf(buf, bufsize, "compiler/%s.lua", eap->arg); - if (source_runtime(buf, DIP_ALL) == FAIL) { - semsg(_(e_compiler_not_supported_str), eap->arg); - } + snprintf(buf, bufsize, "compiler/%s.*", eap->arg); + if (source_runtime_vim_lua(buf, DIP_ALL) == FAIL) { + semsg(_(e_compiler_not_supported_str), eap->arg); } xfree(buf); |