aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-09-02 09:00:04 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-09-02 09:10:50 -0400
commit4bcca0baa9a1100104935868ffc57e14d168deed (patch)
treeb75abfb3c7126916a54bf8c8a77589906539dffa
parentcc64f2cc1dc90c6e2bc24ea1b72c2947fe701549 (diff)
downloadrneovim-4bcca0baa9a1100104935868ffc57e14d168deed.tar.gz
rneovim-4bcca0baa9a1100104935868ffc57e14d168deed.tar.bz2
rneovim-4bcca0baa9a1100104935868ffc57e14d168deed.zip
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
-rw-r--r--src/nvim/spellfile.c4
1 files changed, 2 insertions, 2 deletions
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