mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
vim-patch:8.2.1565: spellfile test sometimes fails
Problem: Spellfile test sometimes fails.
Solution: Check running into the end of the file.
e90d63ea90
This commit is contained in:
parent
cc64f2cc1d
commit
4bcca0baa9
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user