summaryrefslogtreecommitdiff
path: root/src/testdir/test_virtualedit.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_virtualedit.vim')
-rw-r--r--src/testdir/test_virtualedit.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test_virtualedit.vim b/src/testdir/test_virtualedit.vim
index d49025237..abe79f6a4 100644
--- a/src/testdir/test_virtualedit.vim
+++ b/src/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