diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-01-31 08:12:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-31 08:12:29 +0800 |
commit | 4dcc7bcbedbb2a9e9166b94900d4c3e363468578 (patch) | |
tree | 387277d63362a991a8466474812e56f657da8061 | |
parent | 58d01d3403735a5b291015cf3abbdadfface74a1 (diff) | |
download | rneovim-4dcc7bcbedbb2a9e9166b94900d4c3e363468578.tar.gz rneovim-4dcc7bcbedbb2a9e9166b94900d4c3e363468578.tar.bz2 rneovim-4dcc7bcbedbb2a9e9166b94900d4c3e363468578.zip |
vim-patch:8.2.3532: the previous '' mark is restored after moving the cursor (#17246)
-rw-r--r-- | src/nvim/mark.c | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_marks.vim | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/nvim/mark.c b/src/nvim/mark.c index 39f18b333d..8b29aa3676 100644 --- a/src/nvim/mark.c +++ b/src/nvim/mark.c @@ -217,8 +217,8 @@ void checkpcmark(void) && (equalpos(curwin->w_pcmark, curwin->w_cursor) || curwin->w_pcmark.lnum == 0)) { curwin->w_pcmark = curwin->w_prev_pcmark; - curwin->w_prev_pcmark.lnum = 0; // Show it has been checked } + curwin->w_prev_pcmark.lnum = 0; // it has been checked } /* diff --git a/src/nvim/testdir/test_marks.vim b/src/nvim/testdir/test_marks.vim index 4ef42946cb..6b9904ec0a 100644 --- a/src/nvim/testdir/test_marks.vim +++ b/src/nvim/testdir/test_marks.vim @@ -25,6 +25,16 @@ function! Test_Incr_Marks() enew! endfunction +func Test_previous_jump_mark() + new + call setline(1, ['']->repeat(6)) + normal Ggg + call assert_equal(6, getpos("''")[1]) + normal jjjjj + call assert_equal(6, getpos("''")[1]) + bwipe! +endfunc + func Test_setpos() new Xone let onebuf = bufnr('%') |