summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-07-02 19:20:06 +0200
committerBram Moolenaar <Bram@vim.org>2016-07-02 19:20:06 +0200
commit951fa1819ad0e74d73e885d0ec04dd6c70f8d2f7 (patch)
treee85aca874d65e83fe05b281c31c072643b41ef05
parentee2615af64fdcee87d8e4b13b65356e77fbd969b (diff)
downloadvim-951fa1819ad0e74d73e885d0ec04dd6c70f8d2f7.zip
patch 7.4.1982
Problem: Viminfo file contains duplicate change marks. Solution: Drop duplicate marks.
-rw-r--r--src/mark.c7
-rw-r--r--src/version.c2
2 files changed, 8 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]);
diff --git a/src/version.c b/src/version.c
index f8b6fff27..8d9995aef 100644
--- a/src/version.c
+++ b/src/version.c
@@ -759,6 +759,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1982,
+/**/
1981,
/**/
1980,