mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
shada: In place of ignoring cursor position with lnum 0 save with 1
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) && curwin->w_cursor.lnum != 0) {
|
if (!ignore_buf(curbuf, &removable_bufs)) {
|
||||||
replace_numbered_mark(wms, 0, (PossiblyFreedShadaEntry) {
|
replace_numbered_mark(wms, 0, (PossiblyFreedShadaEntry) {
|
||||||
.can_free_entry = false,
|
.can_free_entry = false,
|
||||||
.data = {
|
.data = {
|
||||||
@@ -2804,7 +2804,9 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer,
|
|||||||
.timestamp = os_time(),
|
.timestamp = os_time(),
|
||||||
.data = {
|
.data = {
|
||||||
.filemark = {
|
.filemark = {
|
||||||
.mark = curwin->w_cursor,
|
.mark = (curwin->w_cursor.lnum
|
||||||
|
? curwin->w_cursor
|
||||||
|
: (pos_T) { 1, 0, 0 }),
|
||||||
.name = '0',
|
.name = '0',
|
||||||
.additional_data = NULL,
|
.additional_data = NULL,
|
||||||
.fname = (char *)curbuf->b_ffname,
|
.fname = (char *)curbuf->b_ffname,
|
||||||
|
Reference in New Issue
Block a user