Mercurial > vim
comparison src/mark.c @ 25998:902aab6dc499 v8.2.3532
patch 8.2.3532: the previous '' mark is restored after moving the cursor
Commit: https://github.com/vim/vim/commit/e08aee60abc59f517d3e263fdb9ba4a0196d507c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 17 21:53:58 2021 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 17 Oct 2021 23:00:06 +0200 |
parents | e8e2c4d33b9b |
children | b18f3b0f317c |
comparison
equal
deleted
inserted
replaced
25997:847b1374b39e | 25998:902aab6dc499 |
---|---|
179 checkpcmark(void) | 179 checkpcmark(void) |
180 { | 180 { |
181 if (curwin->w_prev_pcmark.lnum != 0 | 181 if (curwin->w_prev_pcmark.lnum != 0 |
182 && (EQUAL_POS(curwin->w_pcmark, curwin->w_cursor) | 182 && (EQUAL_POS(curwin->w_pcmark, curwin->w_cursor) |
183 || curwin->w_pcmark.lnum == 0)) | 183 || curwin->w_pcmark.lnum == 0)) |
184 { | |
185 curwin->w_pcmark = curwin->w_prev_pcmark; | 184 curwin->w_pcmark = curwin->w_prev_pcmark; |
186 curwin->w_prev_pcmark.lnum = 0; // Show it has been checked | 185 curwin->w_prev_pcmark.lnum = 0; // it has been checked |
187 } | |
188 } | 186 } |
189 | 187 |
190 #if defined(FEAT_JUMPLIST) || defined(PROTO) | 188 #if defined(FEAT_JUMPLIST) || defined(PROTO) |
191 /* | 189 /* |
192 * move "count" positions in the jump list (count may be negative) | 190 * move "count" positions in the jump list (count may be negative) |