feat(shada): shada should not store nobuflisted buffers #21818

Problem:  Shada jumplist entries still include entries from e.g. 'nobuflisted' buffers.
Solution: Check `ignore_buf()` before adding jumplist entries, followup to b98eefd8.

Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
This commit is contained in:
Leonhard Kipp
2025-07-09 18:33:20 +02:00
committed by GitHub
parent 3a3484be29
commit 840cdb9589
2 changed files with 16 additions and 6 deletions

View File

@ -3630,12 +3630,8 @@ static inline size_t shada_init_jumps(PossiblyFreedShadaEntry *jumps,
curwin->w_jumplistlen);
continue;
}
const buf_T *const buf = (fm.fmark.fnum == 0
? NULL
: buflist_findnr(fm.fmark.fnum));
if (buf != NULL
? set_has(ptr_t, removable_bufs, (ptr_t)buf)
: fm.fmark.fnum != 0) {
const buf_T *const buf = (fm.fmark.fnum == 0 ? NULL : buflist_findnr(fm.fmark.fnum));
if (buf != NULL ? ignore_buf(buf, removable_bufs) : fm.fmark.fnum != 0) {
continue;
}
const char *const fname =