aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_normal.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-02-12 02:59:29 +0100
committerGitHub <noreply@github.com>2018-02-12 02:59:29 +0100
commit9e9e4431c122f3b98fb0e7498b6572ceac0bca53 (patch)
treea28f207390cdbbd27a468537e9065f3b8bfa1cbd /src/nvim/testdir/test_normal.vim
parent418947fcb34c46af895994ef9ba10a85d2d4c6c2 (diff)
parent7da4d1561bd29615257a3f61073b5cf39f1f7463 (diff)
downloadrneovim-9e9e4431c122f3b98fb0e7498b6572ceac0bca53.tar.gz
rneovim-9e9e4431c122f3b98fb0e7498b6572ceac0bca53.tar.bz2
rneovim-9e9e4431c122f3b98fb0e7498b6572ceac0bca53.zip
Merge #8001 from justinmk/vimpatches
Diffstat (limited to 'src/nvim/testdir/test_normal.vim')
-rw-r--r--src/nvim/testdir/test_normal.vim42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_normal.vim b/src/nvim/testdir/test_normal.vim
index c7c0dc164c..1d15c7f83d 100644
--- a/src/nvim/testdir/test_normal.vim
+++ b/src/nvim/testdir/test_normal.vim
@@ -2337,3 +2337,45 @@ func! Test_normal54_Ctrl_bsl()
" clean up
bw!
endfunc
+
+" Test for the gr (virtual replace) command
+" Test for the bug fixed by 7.4.387
+func Test_gr_command()
+ enew!
+ let save_cpo = &cpo
+ call append(0, ['First line', 'Second line', 'Third line'])
+ exe "normal i\<C-G>u"
+ call cursor(2, 1)
+ set cpo-=X
+ normal 4gro
+ call assert_equal('oooond line', getline(2))
+ undo
+ set cpo+=X
+ normal 4gro
+ call assert_equal('ooooecond line', getline(2))
+ let &cpo = save_cpo
+ enew!
+endfunc
+
+" When splitting a window the changelist position is wrong.
+" Test the changelist position after splitting a window.
+" Test for the bug fixed by 7.4.386
+func Test_changelist()
+ let save_ul = &ul
+ enew!
+ call append('$', ['1', '2'])
+ exe "normal i\<C-G>u"
+ exe "normal Gkylpa\<C-G>u"
+ set ul=100
+ exe "normal Gylpa\<C-G>u"
+ set ul=100
+ normal gg
+ vsplit
+ normal g;
+ call assert_equal([3, 2], [line('.'), col('.')])
+ normal g;
+ call assert_equal([2, 2], [line('.'), col('.')])
+ call assert_fails('normal g;', 'E662:')
+ %bwipe!
+ let &ul = save_ul
+endfunc