commit 9436e7c9785b7b20125756da584562f35aa7fd4c
parent f0cf4886981eb2d690d6d8f7c70e432f1c2280ee
Author: zeertzjq <zeertzjq@outlook.com>
Date: Mon, 27 Oct 2025 08:13:06 +0800
fix(spell): wrong VimEnter autocommands (#36339)
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nvim/spell.c b/src/nvim/spell.c
@@ -1607,10 +1607,10 @@ static void spell_load_lang(char *lang)
if (r == FAIL) {
if (starting) {
// Prompt the user at VimEnter if spell files are missing. #3027
- // Plugins aren't loaded yet, so spellfile.vim cannot handle this case.
+ // Plugins aren't loaded yet, so nvim/spellfile.lua cannot handle this case.
char autocmd_buf[512] = { 0 };
snprintf(autocmd_buf, sizeof(autocmd_buf),
- "autocmd VimEnter * call spellfile#LoadFile('%s')|set spell",
+ "autocmd VimEnter * call v:lua.require'nvim.spellfile'.load_file('%s')|set spell",
lang);
do_cmdline_cmd(autocmd_buf);
} else {