patch 7.4.1925
Problem: Viminfo does not merge file marks properly.
Solution: Use a timestamp. Add the :clearjumps command.
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index b3b9209..519f40c 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1983,6 +1983,8 @@
*/
if (*wp == 'a')
{
+ EMSG2(_("E929: Too many viminfo temp files, like %s!"),
+ tempname);
vim_free(tempname);
tempname = NULL;
break;
@@ -2164,9 +2166,13 @@
{
if (flags & VIF_WANT_INFO)
{
- /* Registers are read and newer ones are used when writing. */
if (fp_out != NULL)
+ {
+ /* Registers and marks are read and kept separate from what
+ * this Vim is using. They are merged when writing. */
prepare_viminfo_registers();
+ prepare_viminfo_marks();
+ }
eof = read_viminfo_up_to_marks(&vir,
flags & VIF_FORCEIT, fp_out != NULL);
@@ -2200,6 +2206,7 @@
write_viminfo_varlist(fp_out);
#endif
write_viminfo_filemarks(fp_out);
+ finish_viminfo_marks();
write_viminfo_bufferlist(fp_out);
write_viminfo_barlines(&vir, fp_out);
count = write_viminfo_marks(fp_out);
@@ -2778,6 +2785,11 @@
handle_viminfo_register(&values, force);
break;
+ case BARTYPE_MARK:
+ barline_parse(virp, p, &values);
+ handle_viminfo_mark(&values, force);
+ break;
+
default:
/* copy unrecognized line (for future use) */
if (writing)