aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mark.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-10 07:13:22 +0800
committerGitHub <noreply@github.com>2022-04-10 07:13:22 +0800
commitff726cc569994aab61a42c40270e679dc80cca7c (patch)
treeded66b1e5369b72d27cacaa91efc09d3daaa7394 /src/nvim/mark.c
parent12662ac0c4160b81f7875909d765cf8526bbdef2 (diff)
downloadrneovim-ff726cc569994aab61a42c40270e679dc80cca7c.tar.gz
rneovim-ff726cc569994aab61a42c40270e679dc80cca7c.tar.bz2
rneovim-ff726cc569994aab61a42c40270e679dc80cca7c.zip
vim-patch:8.2.4719: ">" marker sometimes not displayed in the jumplist (#18056)
Problem: ">" marker sometimes not displayed in the jumplist. Solution: If the buffer no longer exists show "-invalid-". (Christian Brabandt, closes vim/vim#10131, closes vim/vim#10100) https://github.com/vim/vim/commit/a0f659c76e22108880f857b8961422afc5ed8f5d Add a modeline to test_jumplist.vim
Diffstat (limited to 'src/nvim/mark.c')
-rw-r--r--src/nvim/mark.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/mark.c b/src/nvim/mark.c
index b770fef05c..6790bf8240 100644
--- a/src/nvim/mark.c
+++ b/src/nvim/mark.c
@@ -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);