patch 7.4.1988
Problem: When updating viminfo with file marks there is no time order.
Solution: Remember the time when a buffer was last used, store marks for
the most recently used buffers.
diff --git a/src/buffer.c b/src/buffer.c
index 39a5bcb..058e4d7 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1619,6 +1619,9 @@
if (!curbuf->b_help && curwin->w_p_spell && *curwin->w_s->b_p_spl != NUL)
(void)did_set_spelllang(curwin);
#endif
+#ifdef FEAT_VIMINFO
+ curbuf->b_last_used = vim_time();
+#endif
redraw_later(NOT_VALID);
}