aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/spell.c12
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");