diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-06-12 11:07:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-12 11:07:36 +0800 |
commit | 033810ba23c25a98b7aeb703d1d61463bfcab503 (patch) | |
tree | e1d78515b494a74f209e19ea3d1fa581ead30d6e | |
parent | d73910d7f6126441ffa432bc72c15827f9a0a90b (diff) | |
download | rneovim-033810ba23c25a98b7aeb703d1d61463bfcab503.tar.gz rneovim-033810ba23c25a98b7aeb703d1d61463bfcab503.tar.bz2 rneovim-033810ba23c25a98b7aeb703d1d61463bfcab503.zip |
vim-patch:9.1.0477: block_editing errors out when using <enter> (#29294)
Problem: block_editing errors out when using <enter>
(Ali Rizvi-Santiago, after v9.1.0274)
Solution: Change ins_len from size_t to int so that the test
if ins_len is negative actually works properly
Add a test, so that this doesn't regress.
fixes: vim/vim#14960
https://github.com/vim/vim/commit/1fb9eae5794c3f808468fbc2935c5144f9e0b5b1
Co-authored-by: Christian Brabandt <cb@256bit.org>
-rw-r--r-- | test/old/testdir/test_visual.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/old/testdir/test_visual.vim b/test/old/testdir/test_visual.vim index 0b840944bf..5307c49012 100644 --- a/test/old/testdir/test_visual.vim +++ b/test/old/testdir/test_visual.vim @@ -2709,4 +2709,13 @@ func Test_visual_block_cursor_delete() bwipe! endfunc +func Test_visual_block_cursor_insert_enter() + new + call setline(1, ['asdf asdf', 'asdf asdf', 'asdf asdf', 'asdf asdf']) + call cursor(1, 5) + exe ":norm! \<c-v>3jcw\<cr>" + call assert_equal(['asdfw', 'asdf', 'asdfasdf', 'asdfasdf', 'asdfasdf'], getline(1, '$')) + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |