diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-06-21 21:29:21 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-06-23 18:17:09 -0400 |
| commit | 3abffe7015701f2468f94af3280871cd34653747 (patch) | |
| tree | 3ab6156af0c1a82b6e71c360493a11f1e4e46553 /src/nvim/testdir | |
| parent | f0d6695e7cc13cd5f1ee006575a369faf2546893 (diff) | |
| download | rneovim-3abffe7015701f2468f94af3280871cd34653747.tar.gz rneovim-3abffe7015701f2468f94af3280871cd34653747.tar.bz2 rneovim-3abffe7015701f2468f94af3280871cd34653747.zip | |
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 vim/vim#3114) Rename PCHAR() to PBYTE() to avoid mistakes like
this.
https://github.com/vim/vim/commit/630afe889a2a02b367ea8eaaa48e66ed81e77ff3
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_virtualedit.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_virtualedit.vim b/src/nvim/testdir/test_virtualedit.vim index d49025237b..abe79f6a4a 100644 --- a/src/nvim/testdir/test_virtualedit.vim +++ b/src/nvim/testdir/test_virtualedit.vim @@ -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 |