mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
spellfile: Use old error
This makes first test not actually show any change in behaviour.
This commit is contained in:
parent
8d982ab522
commit
5b4f07ee86
@ -1006,7 +1006,7 @@ static int read_prefcond_section(FILE *fd, slang_T *lp)
|
|||||||
buf[0] = '^'; // always match at one position only
|
buf[0] = '^'; // always match at one position only
|
||||||
const size_t read_byte = fread(buf + 1, 1, (size_t)n, fd);
|
const size_t read_byte = fread(buf + 1, 1, (size_t)n, fd);
|
||||||
if (read_byte != (size_t)n) {
|
if (read_byte != (size_t)n) {
|
||||||
return feof(fd) ? SP_FORMERROR : SP_OTHERERROR;
|
return feof(fd) ? SP_TRUNCERROR : SP_OTHERERROR;
|
||||||
}
|
}
|
||||||
if (memchr(buf + 1, NUL, (size_t)n)) {
|
if (memchr(buf + 1, NUL, (size_t)n)) {
|
||||||
return SP_FORMERROR;
|
return SP_FORMERROR;
|
||||||
|
@ -34,7 +34,7 @@ describe('spellfile', function()
|
|||||||
-- │ │ ┌ Condition regex (missing!)
|
-- │ │ ┌ Condition regex (missing!)
|
||||||
.. '\000\001\001')
|
.. '\000\001\001')
|
||||||
meths.set_option('spelllang', 'en')
|
meths.set_option('spelllang', 'en')
|
||||||
eq('Vim(set):E759: Format error in spell file',
|
eq('Vim(set):E758: Truncated spell file',
|
||||||
exc_exec('set spell'))
|
exc_exec('set spell'))
|
||||||
end)
|
end)
|
||||||
it('errors out when prefcond regexp contains NUL byte', function()
|
it('errors out when prefcond regexp contains NUL byte', function()
|
||||||
|
Loading…
Reference in New Issue
Block a user