vim-patch:8.2.3532: the previous '' mark is restored after moving the cursor (#17246)

This commit is contained in:
zeertzjq 2022-01-31 08:12:29 +08:00 committed by GitHub
parent 58d01d3403
commit 4dcc7bcbed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -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
}
/*

View File

@ -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('%')