aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-01-29 06:05:39 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-01-29 06:05:39 +0800
commitfee7d6fba4a940bdc76661fb06eaa91e24149b51 (patch)
tree3858290b3cd52ac6254d760f693bd5d8d08e5af1 /src/nvim/testdir
parentaf9a2a201d5e2bc178488a04c114ba6c1db4fa19 (diff)
downloadrneovim-fee7d6fba4a940bdc76661fb06eaa91e24149b51.tar.gz
rneovim-fee7d6fba4a940bdc76661fb06eaa91e24149b51.tar.bz2
rneovim-fee7d6fba4a940bdc76661fb06eaa91e24149b51.zip
vim-patch:8.2.3454: using a count with "gp" leave cursor in wrong position
Problem: Using a count with "gp" leave cursor in wrong position. (Naohiro Ono) Solution: Count the inserted lines. (closes vim/vim#8899) https://github.com/vim/vim/commit/23003e51e18371afda4420d9e171a3dcba5a31cc
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_put.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_put.vim b/src/nvim/testdir/test_put.vim
index 440717eaa8..aceac58493 100644
--- a/src/nvim/testdir/test_put.vim
+++ b/src/nvim/testdir/test_put.vim
@@ -112,6 +112,16 @@ func Test_put_p_indent_visual()
bwipe!
endfunc
+func Test_gp_with_count_leaves_cursor_at_end()
+ new
+ call setline(1, '<---->')
+ call setreg('@', "foo\nbar", 'c')
+ exe "normal 1G3|3gpix\<Esc>"
+ call assert_equal(['<--foo', 'barfoo', 'barfoo', 'barx-->'], getline(1, '$'))
+
+ bwipe!
+endfunc
+
func Test_multibyte_op_end_mark()
new
call setline(1, 'ั‚ะตัั‚')