Mercurial > vim
comparison src/spellfile.c @ 22031:f33de1c1eb4a v8.2.1565
patch 8.2.1565: spellfile test sometimes fails
Commit: https://github.com/vim/vim/commit/e90d63ea904187ecbb09d0f7f21b71b302b30644
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 2 12:58:48 2020 +0200
patch 8.2.1565: spellfile test sometimes fails
Problem: Spellfile test sometimes fails.
Solution: Check running into the end of the file.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 02 Sep 2020 13:00:03 +0200 |
parents | 2d6d70a913c1 |
children | ba4f8569ff8a |
comparison
equal
deleted
inserted
replaced
22030:8b0a2216a70e | 22031:f33de1c1eb4a |
---|---|
3531 | 3531 |
3532 // start with a message for the first line | 3532 // start with a message for the first line |
3533 spin->si_msg_count = 999999; | 3533 spin->si_msg_count = 999999; |
3534 | 3534 |
3535 // Read and ignore the first line: word count. | 3535 // Read and ignore the first line: word count. |
3536 (void)vim_fgets(line, MAXLINELEN, fd); | 3536 if (vim_fgets(line, MAXLINELEN, fd) || !vim_isdigit(*skipwhite(line))) |
3537 if (!vim_isdigit(*skipwhite(line))) | |
3538 semsg(_("E760: No word count in %s"), fname); | 3537 semsg(_("E760: No word count in %s"), fname); |
3539 | 3538 |
3540 /* | 3539 /* |
3541 * Read all the lines in the file one by one. | 3540 * Read all the lines in the file one by one. |
3542 * The words are converted to 'encoding' here, before being added to | 3541 * The words are converted to 'encoding' here, before being added to |