0
0
mirror of https://github.com/vim/vim.git synced 2025-10-14 07:04:10 -04:00

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.
This commit is contained in:
Bram Moolenaar
2022-01-17 17:30:21 +00:00
parent e8741a73e2
commit 9f8c304c8a
3 changed files with 37 additions and 14 deletions

View File

@@ -1278,6 +1278,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