mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06: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:
parent
7941aaa3bf
commit
30e7fb2e32
@ -2796,7 +2796,7 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *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)) {
|
||||
if (!ignore_buf(curbuf, &removable_bufs) && curwin->w_cursor.lnum != 0) {
|
||||
replace_numbered_mark(wms, 0, (PossiblyFreedShadaEntry) {
|
||||
.can_free_entry = false,
|
||||
.data = {
|
||||
|
Loading…
Reference in New Issue
Block a user