mirror of
https://github.com/neovim/neovim.git
synced 2025-11-15 23:01:24 +00:00
fix(spell): wrong VimEnter autocommands (#36339)
This commit is contained in:
@@ -1607,10 +1607,10 @@ static void spell_load_lang(char *lang)
|
|||||||
if (r == FAIL) {
|
if (r == FAIL) {
|
||||||
if (starting) {
|
if (starting) {
|
||||||
// Prompt the user at VimEnter if spell files are missing. #3027
|
// 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 };
|
char autocmd_buf[512] = { 0 };
|
||||||
snprintf(autocmd_buf, sizeof(autocmd_buf),
|
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);
|
lang);
|
||||||
do_cmdline_cmd(autocmd_buf);
|
do_cmdline_cmd(autocmd_buf);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user