mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
shada: Also filter out invalid cursor position when writing '0' mark
Based on https://github.com/neovim/neovim/pull/5908#issuecomment-375909903, but with adjusted condition as line number or column less then zero should not appear at all based on what I know.
This commit is contained in:
@@ -2796,7 +2796,7 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer,
|
|||||||
|
|
||||||
// Update numbered marks: '0' should be replaced with the current position,
|
// Update numbered marks: '0' should be replaced with the current position,
|
||||||
// '9' should be removed and all other marks shifted.
|
// '9' should be removed and all other marks shifted.
|
||||||
if (!ignore_buf(curbuf, &removable_bufs)) {
|
if (!ignore_buf(curbuf, &removable_bufs) && curwin->w_cursor.lnum != 0) {
|
||||||
replace_numbered_mark(wms, 0, (PossiblyFreedShadaEntry) {
|
replace_numbered_mark(wms, 0, (PossiblyFreedShadaEntry) {
|
||||||
.can_free_entry = false,
|
.can_free_entry = false,
|
||||||
.data = {
|
.data = {
|
||||||
|
Reference in New Issue
Block a user