fix(shada): preserve marks after delete across sessions (#35795)

Problem: Marks are lost after `:bdelete` because `ignore_buf()` filters
out unlisted buffers during shada mark processing.

Solution: Revert to original buffer checks for mark operations, avoiding
`!buf->b_p_bl` condition that incorrectly ignores deleted buffers.
This commit is contained in:
glepnir
2025-09-30 13:28:35 +08:00
committed by GitHub
parent 35fc4fda99
commit 198c9e9bca
2 changed files with 28 additions and 1 deletions

View File

@@ -2443,7 +2443,8 @@ static ShaDaWriteResult shada_write(FileDescriptor *const sd_writer,
fname = fm.fname;
} else {
const buf_T *const buf = buflist_findnr(fm.fmark.fnum);
if (ignore_buf(buf, &removable_bufs)) {
if (buf == NULL || buf->b_ffname == NULL
|| set_has(ptr_t, &removable_bufs, (ptr_t)buf)) {
continue;
}
fname = buf->b_ffname;