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

1fb9eae579

Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2024-06-12 11:07:36 +08:00
committed by GitHub
parent d73910d7f6
commit 033810ba23

View File

@@ -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