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)
a0f659c76e

Add a modeline to test_jumplist.vim
This commit is contained in:
zeertzjq
2022-04-10 07:13:22 +08:00
committed by GitHub
parent 12662ac0c4
commit ff726cc569
5 changed files with 49 additions and 12 deletions

View File

@@ -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);