aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2018-03-27 03:03:02 +0300
committerZyX <kp-pav@yandex.ru>2018-03-27 03:03:02 +0300
commit3df11cfbca3dc037974eb6c61d8f9413b3b7ca9c (patch)
treed33eb52cf744eafd0147ec5189159edfc727beec
parent920c582320085fa4bf0cf467fff572af47126ff7 (diff)
downloadrneovim-3df11cfbca3dc037974eb6c61d8f9413b3b7ca9c.tar.gz
rneovim-3df11cfbca3dc037974eb6c61d8f9413b3b7ca9c.tar.bz2
rneovim-3df11cfbca3dc037974eb6c61d8f9413b3b7ca9c.zip
Revert "shada: In place of ignoring cursor position with lnum 0 save with 1"
This reverts commit aa728798b4bd89b59cee86103885c15d386f73ba.
-rw-r--r--src/nvim/shada.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/shada.c b/src/nvim/shada.c
index 552dd2dcf4..f726f09fad 100644
--- a/src/nvim/shada.c
+++ b/src/nvim/shada.c
@@ -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 = {
@@ -2804,9 +2804,7 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer,
.timestamp = os_time(),
.data = {
.filemark = {
- .mark = (curwin->w_cursor.lnum
- ? curwin->w_cursor
- : (pos_T) { 1, 0, 0 }),
+ .mark = curwin->w_cursor,
.name = '0',
.additional_data = NULL,
.fname = (char *)curbuf->b_ffname,