fix(shada): don't add '0' mark if f0 in 'shada'

This commit is contained in:
Andre Toerien
2025-04-19 14:57:13 +02:00
parent 1f503ac7c0
commit 36dbd2686f
2 changed files with 93 additions and 7 deletions

View File

@@ -2559,9 +2559,9 @@ static ShaDaWriteResult shada_write(FileDescriptor *const sd_writer,
}
}
// Update numbered marks: '0' should be replaced with the current position,
// '9' should be removed and all other marks shifted.
if (!ignore_buf(curbuf, &removable_bufs) && curwin->w_cursor.lnum != 0) {
// Update numbered marks: replace '0 mark with the current position,
// remove '9 and shift all other marks. Skip if f0 in 'shada'.
if (dump_global_marks && !ignore_buf(curbuf, &removable_bufs) && curwin->w_cursor.lnum != 0) {
replace_numbered_mark(wms, 0, (PossiblyFreedShadaEntry) {
.can_free_entry = false,
.data = {