aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2015-08-10 02:29:16 +0300
committerZyX <kp-pav@yandex.ru>2015-10-08 22:00:37 +0300
commitfcb3e96cbdaa49472abde3cbf8792c12a46e2082 (patch)
tree6e38db08517f05ab905e5e659242c38b82986d9e
parent4dc3bc8fc1d94f9f97ab06d030b9279e7e3b5934 (diff)
downloadrneovim-fcb3e96cbdaa49472abde3cbf8792c12a46e2082.tar.gz
rneovim-fcb3e96cbdaa49472abde3cbf8792c12a46e2082.tar.bz2
rneovim-fcb3e96cbdaa49472abde3cbf8792c12a46e2082.zip
undo: When reading persistent undo file give marks current time
Guess this is better then zero time which will give ShaDa marks the priority almost always.
-rw-r--r--src/nvim/undo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index b2f71432dc..2b0ffefa7e 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -841,9 +841,10 @@ static u_header_T *unserialize_uhp(bufinfo_T *bi, char_u *file_name)
unserialize_pos(bi, &uhp->uh_cursor);
uhp->uh_cursor_vcol = undo_read_4c(bi);
uhp->uh_flags = undo_read_2c(bi);
+ const Timestamp cur_timestamp = os_time();
for (size_t i = 0; i < (size_t)NMARKS; i++) {
unserialize_pos(bi, &uhp->uh_namedm[i].mark);
- uhp->uh_namedm[i].timestamp = 0;
+ uhp->uh_namedm[i].timestamp = cur_timestamp;
uhp->uh_namedm[i].fnum = 0;
}
unserialize_visualinfo(bi, &uhp->uh_visual);