summaryrefslogtreecommitdiff
path: root/src/mark.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mark.c')
-rw-r--r--src/mark.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mark.c b/src/mark.c
index 264124f59..2e8fdd63f 100644
--- a/src/mark.c
+++ b/src/mark.c
@@ -1859,7 +1859,12 @@ write_viminfo_marks(FILE *fp_out)
#ifdef FEAT_JUMPLIST
/* changelist positions are stored oldest first */
for (i = 0; i < buf->b_changelistlen; ++i)
- write_one_mark(fp_out, '+', &buf->b_changelist[i]);
+ {
+ /* skip duplicates */
+ if (i == 0 || !equalpos(buf->b_changelist[i - 1],
+ buf->b_changelist[i]))
+ write_one_mark(fp_out, '+', &buf->b_changelist[i]);
+ }
#endif
for (i = 0; i < NMARKS; i++)
write_one_mark(fp_out, 'a' + i, &buf->b_namedm[i]);