aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/mark.c2
-rw-r--r--src/nvim/testdir/test_marks.vim10
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('%')