mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.3532: the previous '' mark is restored after moving the cursor (#17246)
This commit is contained in:
parent
58d01d3403
commit
4dcc7bcbed
@ -217,8 +217,8 @@ void checkpcmark(void)
|
|||||||
&& (equalpos(curwin->w_pcmark, curwin->w_cursor)
|
&& (equalpos(curwin->w_pcmark, curwin->w_cursor)
|
||||||
|| curwin->w_pcmark.lnum == 0)) {
|
|| curwin->w_pcmark.lnum == 0)) {
|
||||||
curwin->w_pcmark = curwin->w_prev_pcmark;
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -25,6 +25,16 @@ function! Test_Incr_Marks()
|
|||||||
enew!
|
enew!
|
||||||
endfunction
|
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()
|
func Test_setpos()
|
||||||
new Xone
|
new Xone
|
||||||
let onebuf = bufnr('%')
|
let onebuf = bufnr('%')
|
||||||
|
Loading…
Reference in New Issue
Block a user