diff options
author | Felipe Morales <hel.sheep@gmail.com> | 2015-07-16 22:26:58 -0300 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-07-17 06:59:25 -0400 |
commit | 5e9f9a875645af1e3c858daba799fe4a9021a767 (patch) | |
tree | c4e0a97795910623d537a2f28419f2b0fbff184c | |
parent | 883b78d29864f39b8032468c4374766dad7d142f (diff) | |
download | rneovim-5e9f9a875645af1e3c858daba799fe4a9021a767.tar.gz rneovim-5e9f9a875645af1e3c858daba799fe4a9021a767.tar.bz2 rneovim-5e9f9a875645af1e3c858daba799fe4a9021a767.zip |
spell: Defer &spell prompt until VimEnter. #3027
Closes #1551
-rw-r--r-- | src/nvim/spell.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index acff14bc40..f9ed6faff9 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -2328,8 +2328,16 @@ static void spell_load_lang(char_u *lang) } if (r == FAIL) { - smsg(_("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""), - lang, spell_enc(), lang); + if (starting) { + // Some startup file sets &spell, but the necessary files don't exist: + // try to prompt the user at VimEnter. Also set spell again. #3027 + do_cmdline_cmd( + "autocmd VimEnter * call spellfile#LoadFile(&spelllang)|set spell"); + } else { + smsg( + _("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""), + lang, spell_enc(), lang); + } } else if (sl.sl_slang != NULL) { // At least one file was loaded, now load ALL the additions. STRCPY(fname_enc + STRLEN(fname_enc) - 3, "add.spl"); |