0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 8.2.3532: the previous '' mark is restored after moving the cursor

Problem:    The previous '' mark is restored after moving the cursor to the
            original jump position. (Tony Chen)
Solution:   Forget the previous position after checking. (closes #8985)
This commit is contained in:
Bram Moolenaar
2021-10-17 21:53:58 +01:00
parent 39c47c3104
commit e08aee60ab
3 changed files with 13 additions and 3 deletions

View File

@@ -181,10 +181,8 @@ checkpcmark(void)
if (curwin->w_prev_pcmark.lnum != 0
&& (EQUAL_POS(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
}
#if defined(FEAT_JUMPLIST) || defined(PROTO)