aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mark.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/mark.c')
-rw-r--r--src/nvim/mark.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/mark.c b/src/nvim/mark.c
index 39f18b333d..6790bf8240 100644
--- a/src/nvim/mark.c
+++ b/src/nvim/mark.c
@@ -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
}
/*
@@ -630,7 +630,7 @@ static char_u *mark_line(pos_T *mp, int lead_len)
if (mp->lnum == 0 || mp->lnum > curbuf->b_ml.ml_line_count) {
return vim_strsave((char_u *)"-invalid-");
}
- assert(Columns >= 0 && (size_t)Columns <= SIZE_MAX);
+ assert(Columns >= 0);
// Allow for up to 5 bytes per character.
s = vim_strnsave(skipwhite(ml_get(mp->lnum)), (size_t)Columns * 5);
@@ -844,6 +844,11 @@ void ex_jumps(exarg_T *eap)
if (curwin->w_jumplist[i].fmark.mark.lnum != 0) {
name = fm_getname(&curwin->w_jumplist[i].fmark, 16);
+ // Make sure to output the current indicator, even when on an wiped
+ // out buffer. ":filter" may still skip it.
+ if (name == NULL && i == curwin->w_jumplistidx) {
+ name = vim_strsave((char_u *)"-invalid-");
+ }
// apply :filter /pat/ or file name not available
if (name == NULL || message_filtered(name)) {
xfree(name);