diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-09-14 19:28:13 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-09-14 19:29:40 +0800 |
commit | 5191a11d66b925561b5f705aa42759a0e2a5624a (patch) | |
tree | 3717f8aff261d15a8afb68d8c0f8515cfe8d9e7f /test | |
parent | 90585e47feb7b4c4d878ad32480e2fc09744a7ed (diff) | |
download | rneovim-5191a11d66b925561b5f705aa42759a0e2a5624a.tar.gz rneovim-5191a11d66b925561b5f705aa42759a0e2a5624a.tar.bz2 rneovim-5191a11d66b925561b5f705aa42759a0e2a5624a.zip |
vim-patch:9.1.0730: Crash with cursor-screenline and narrow window
Problem: Crash with cursor-screenline and narrow window
(elig0n)
Solution: Don't set right_col when width2 is 0 (zeertzjq).
fixes: vim/vim#15677
closes: vim/vim#15678
https://github.com/vim/vim/commit/59149f02692804267e7cc0665d0334f6ff4675be
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_cursorline.vim | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/old/testdir/test_cursorline.vim b/test/old/testdir/test_cursorline.vim index d9c77c0b36..2c375f20c0 100644 --- a/test/old/testdir/test_cursorline.vim +++ b/test/old/testdir/test_cursorline.vim @@ -300,7 +300,7 @@ func Test_cursorline_screenline_update() set cursorline cursorlineopt=screenline inoremap <F2> <Cmd>call cursor(1, 1)<CR> END - call writefile(lines, 'Xcul_screenline') + call writefile(lines, 'Xcul_screenline', 'D') let buf = RunVimInTerminal('-S Xcul_screenline', #{rows: 8}) call term_sendkeys(buf, "A") @@ -310,7 +310,17 @@ func Test_cursorline_screenline_update() call term_sendkeys(buf, "\<Esc>") call StopVimInTerminal(buf) - call delete('Xcul_screenline') +endfunc + +func Test_cursorline_screenline_zero_width() + CheckOption foldcolumn + + set cursorline culopt=screenline winminwidth=1 foldcolumn=1 + " This used to crash Vim + 1vnew | redraw + + bwipe! + set cursorline& culopt& winminwidth& foldcolumn& endfunc func Test_cursorline_cursorbind_horizontal_scroll() |