aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mark.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-07-27 22:56:05 +0200
committerGitHub <noreply@github.com>2019-07-27 22:56:05 +0200
commit8e6b0a73c91bb8650e21f56183c7fa83f6fb312f (patch)
treeac70d41d2179452b01fd618afeb6d0e39be26576 /src/nvim/mark.c
parent0e23ee3cc77960f5348dfa6eeb56e97432019126 (diff)
parentb6278bbf12dd4946095b76f47b7c2ace3f929245 (diff)
downloadrneovim-8e6b0a73c91bb8650e21f56183c7fa83f6fb312f.tar.gz
rneovim-8e6b0a73c91bb8650e21f56183c7fa83f6fb312f.tar.bz2
rneovim-8e6b0a73c91bb8650e21f56183c7fa83f6fb312f.zip
Merge #10619 'API: context'
Diffstat (limited to 'src/nvim/mark.c')
-rw-r--r--src/nvim/mark.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/mark.c b/src/nvim/mark.c
index 3736004527..9f357575d0 100644
--- a/src/nvim/mark.c
+++ b/src/nvim/mark.c
@@ -1213,8 +1213,8 @@ void cleanup_jumplist(win_T *wp, bool loadfiles)
// When pointer is below last jump, remove the jump if it matches the current
// line. This avoids useless/phantom jumps. #9805
- if (wp->w_jumplistlen
- && wp->w_jumplistidx == wp->w_jumplistlen) {
+ if (loadfiles // otherwise (i.e.: Shada), last entry should be kept
+ && wp->w_jumplistlen && wp->w_jumplistidx == wp->w_jumplistlen) {
const xfmark_T *fm_last = &wp->w_jumplist[wp->w_jumplistlen - 1];
if (fm_last->fmark.fnum == curbuf->b_fnum
&& fm_last->fmark.mark.lnum == wp->w_cursor.lnum) {