vim-patch:8.2.4120: block insert goes over the end of the line

Problem:    Block insert goes over the end of the line.
Solution:   Handle invalid byte better.  Fix inserting the wrong text.
9f8c304c8a
This commit is contained in:
Sean Dewar
2022-02-03 01:10:33 +00:00
parent f8b75e5822
commit e662d86e8d
2 changed files with 33 additions and 14 deletions

View File

@@ -1242,6 +1242,15 @@ func Test_visual_block_ctrl_w_f()
au! BufNew
endfunc
func Test_visual_block_append_invalid_char()
" this was going over the end of the line
new
call setline(1, [' let xxx', 'xxxxxˆ', 'xxxxxxxxxxx'])
exe "normal 0\<C-V>jjA-\<Esc>"
call assert_equal([' - let xxx', 'xxxxx -ˆ', 'xxxxxxxx-xxx'], getline(1, 3))
bwipe!
endfunc
func Test_visual_reselect_with_count()
" this was causing an illegal memory access
let lines =<< trim END