mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 07:58:35 +00:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user