0
0
mirror of https://github.com/vim/vim.git synced 2025-07-24 10:45:12 -04:00

patch 7.4.1982

Problem:    Viminfo file contains duplicate change marks.
Solution:   Drop duplicate marks.
This commit is contained in:
Bram Moolenaar 2016-07-02 19:20:06 +02:00
parent ee2615af64
commit 951fa1819a
2 changed files with 8 additions and 1 deletions

View File

@ -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]);

View File

@ -758,6 +758,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1982,
/**/
1981,
/**/