From 7812c6830cb8a600c33eec1854c97ac31e4e03fb Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 29 Jan 2022 06:05:39 +0800 Subject: vim-patch:8.2.3455: using a count with "gp" leaves '] in wrong position Problem: Using a count with "gp" leaves '] in wrong position. (Naohiro Ono) Solution: Correct the mark position. (closes vim/vim#8899) https://github.com/vim/vim/commit/56858e4ed4e338e15821767b8303b06099e40384 --- src/nvim/testdir/test_put.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_put.vim b/src/nvim/testdir/test_put.vim index aceac58493..3b6b2e0e0d 100644 --- a/src/nvim/testdir/test_put.vim +++ b/src/nvim/testdir/test_put.vim @@ -116,8 +116,10 @@ func Test_gp_with_count_leaves_cursor_at_end() new call setline(1, '<---->') call setreg('@', "foo\nbar", 'c') - exe "normal 1G3|3gpix\" - call assert_equal(['<--foo', 'barfoo', 'barfoo', 'barx-->'], getline(1, '$')) + normal 1G3|3gp + call assert_equal([0, 4, 4, 0], getpos(".")) + call assert_equal(['<--foo', 'barfoo', 'barfoo', 'bar-->'], getline(1, '$')) + call assert_equal([0, 4, 3, 0], getpos("']")) bwipe! endfunc -- cgit