Merge pull request #38299 from zeertzjq/vim-9.2.0159

vim-patch:9.2.{0159,0162,0165}
This commit is contained in:
zeertzjq
2026-03-15 07:09:29 +08:00
committed by GitHub
3 changed files with 21 additions and 6 deletions

View File

@@ -815,6 +815,7 @@ retry:
// Copy the read part of the line, excluding null-terminator
memcpy(state->growbuf, IObuff, IOSIZE - 1);
size_t growbuflen = state->linelen;
state->growbuf[growbuflen] = NUL;
while (true) {
errno = 0;

View File

@@ -156,13 +156,13 @@ func Test_perleval()
call assert_equal(0, perleval('0'))
call assert_equal(2, perleval('2'))
call assert_equal(-2, perleval('-2'))
if has('float')
call assert_equal(2.5, perleval('2.5'))
else
call assert_equal(2, perleval('2.5'))
end
call assert_equal(2.5, perleval('2.5'))
" sandbox call assert_equal(2, perleval('2'))
try
sandbox call perleval('2')
call assert_report('perleval did not fail in the sandbox')
catch /^Vim\%((\S\+)\)\=:E48:/
endtry
call assert_equal('abc', perleval('"abc"'))
" call assert_equal("abc\ndef", perleval('"abc\0def"'))

View File

@@ -7014,4 +7014,18 @@ func Test_quickfixtextfunc_wipes_buffer()
bw
endfunc
func Test_quickfix_longline_noeol()
let qf = 'Xquickfix'
let args = $"-q {qf}"
let after =<< trim [CODE]
call writefile(['okay'], "XDONE")
qall!
[CODE]
defer delete("XDONE")
call writefile([repeat('A', 1024)], qf, 'bD')
call RunVim([], after, args)
call WaitForAssert({-> assert_true(filereadable("XDONE"))})
call assert_equal(['okay'], readfile("XDONE"))
endfunc
" vim: shiftwidth=2 sts=2 expandtab