fix(spell): properly source spell/LANG.{vim,lua} (#22716)

Using regexp doesn't work here because there are no wildcards.
This commit is contained in:
zeertzjq
2023-03-18 09:55:08 +08:00
committed by GitHub
parent eb3fcf652b
commit c6f8af36e1
2 changed files with 27 additions and 14 deletions

View File

@@ -1578,7 +1578,9 @@ static void do_spelllang_source(win_T *win)
}
}
if (p > q) {
vim_snprintf(fname, sizeof(fname), "spell/%.*s.\\(vim\\|lua\\)", (int)(p - q), q);
vim_snprintf(fname, sizeof(fname), "spell/%.*s.vim", (int)(p - q), q);
source_runtime(fname, DIP_ALL);
vim_snprintf(fname, sizeof(fname), "spell/%.*s.lua", (int)(p - q), q);
source_runtime(fname, DIP_ALL);
}
}