diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-02 19:20:06 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-02 19:20:06 +0200 |
commit | 951fa1819ad0e74d73e885d0ec04dd6c70f8d2f7 (patch) | |
tree | e85aca874d65e83fe05b281c31c072643b41ef05 /src | |
parent | ee2615af64fdcee87d8e4b13b65356e77fbd969b (diff) | |
download | vim-git-951fa1819ad0e74d73e885d0ec04dd6c70f8d2f7.tar.gz |
patch 7.4.1982v7.4.1982
Problem: Viminfo file contains duplicate change marks.
Solution: Drop duplicate marks.
Diffstat (limited to 'src')
-rw-r--r-- | src/mark.c | 7 | ||||
-rw-r--r-- | src/version.c | 2 |
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, |