forked from aniani/vim
patch 8.1.0125: virtual edit replace with multi-byte fails at end of line
Problem: Virtual edit replace with multi-byte fails at end of line. (Lukas
Werling)
Solution: use ins_char() to add the character. (Christian Brabandt,
closes #3114) Rename PCHAR() to PBYTE() to avoid mistakes like
this.
This commit is contained in:
@@ -42,6 +42,22 @@ func Test_paste_end_of_line()
|
||||
set virtualedit=
|
||||
endfunc
|
||||
|
||||
func Test_replace_end_of_line()
|
||||
new
|
||||
set virtualedit=all
|
||||
call setline(1, range(20))
|
||||
exe "normal! gg2jv10lr-"
|
||||
call assert_equal(["1", "-----------", "3"], getline(2,4))
|
||||
if has('multi_byte')
|
||||
call setline(1, range(20))
|
||||
exe "normal! gg2jv10lr\<c-k>hh"
|
||||
call assert_equal(["1", "───────────", "3"], getline(2,4))
|
||||
endif
|
||||
|
||||
bwipe!
|
||||
set virtualedit=
|
||||
endfunc
|
||||
|
||||
func Test_edit_CTRL_G()
|
||||
new
|
||||
set virtualedit=insert
|
||||
|
||||
Reference in New Issue
Block a user