From 4bcca0baa9a1100104935868ffc57e14d168deed Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 2 Sep 2020 09:00:04 -0400 Subject: vim-patch:8.2.1565: spellfile test sometimes fails Problem: Spellfile test sometimes fails. Solution: Check running into the end of the file. https://github.com/vim/vim/commit/e90d63ea904187ecbb09d0f7f21b71b302b30644 --- src/nvim/spellfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c index a7d26e2a8e..c2212cf767 100644 --- a/src/nvim/spellfile.c +++ b/src/nvim/spellfile.c @@ -3038,9 +3038,9 @@ static int spell_read_dic(spellinfo_T *spin, char_u *fname, afffile_T *affile) spin->si_msg_count = 999999; // Read and ignore the first line: word count. - (void)vim_fgets(line, MAXLINELEN, fd); - if (!ascii_isdigit(*skipwhite(line))) + if (vim_fgets(line, MAXLINELEN, fd) || !ascii_isdigit(*skipwhite(line))) { EMSG2(_("E760: No word count in %s"), fname); + } // Read all the lines in the file one by one. // The words are converted to 'encoding' here, before being added to -- cgit