aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-03-30 21:41:05 +0800
committerGitHub <noreply@github.com>2025-03-30 13:41:05 +0000
commit431c037709d1e0e44a97b9eaa51afdc8354b492c (patch)
tree5d5a52f43a9215b51c12954d81a271b466d5e0c4 /test
parent75fe54050081d8338a01b8cf72da424f022d0d83 (diff)
downloadrneovim-431c037709d1e0e44a97b9eaa51afdc8354b492c.tar.gz
rneovim-431c037709d1e0e44a97b9eaa51afdc8354b492c.tar.bz2
rneovim-431c037709d1e0e44a97b9eaa51afdc8354b492c.zip
vim-patch:9.1.1260: Hang when filtering buffer with NUL bytes (#33192)
Problem: Hang when filtering buffer with NUL bytes (after 9.1.1050). Solution: Don't subtract "written" from "lplen" repeatedly (zeertzjq). related: neovim/neovim#33173 closes: vim/vim#17011 https://github.com/vim/vim/commit/53fed23cb7bd59d9400961b44c6c8dca0029c929
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_shell.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/old/testdir/test_shell.vim b/test/old/testdir/test_shell.vim
index 9499462a70..e30e9c9ec8 100644
--- a/test/old/testdir/test_shell.vim
+++ b/test/old/testdir/test_shell.vim
@@ -281,4 +281,18 @@ func Test_shell_no_prevcmd()
call delete('Xtestdone')
endfunc
+func Test_shell_filter_buffer_with_nul_bytes()
+ CheckUnix
+ new
+ set noshelltemp
+ " \n is a NUL byte
+ let lines = ["aaa\nbbb\nccc\nddd\neee", "fff\nggg\nhhh\niii\njjj"]
+ call setline(1, lines)
+ %!cat
+ call assert_equal(lines, getline(1, '$'))
+
+ set shelltemp&
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab