Patch 7.4.1938
Problem: When writing viminfo numbered marks were duplicated.
Solution: Check for duplicates between current numbered marks and the ones
read from viminfo.
Files: src/mark.c
*** ../vim-7.4.1937/src/mark.c 2016-06-13 22:22:10.884157766 +0200
--- src/mark.c 2016-06-14 22:53:29.969979053 +0200
***************
*** 1674,1686 ****
idx = NMARKS;
for (i = NMARKS; i < NMARKS + EXTRA_MARKS; i++)
{
! if (vi_namedfm != NULL
! && vi_namedfm[vi_idx].fmark.mark.lnum != 0
! && (vi_namedfm[vi_idx].time_set > namedfm[idx].time_set
|| namedfm[idx].fmark.mark.lnum == 0))
! fm = &vi_namedfm[vi_idx++];
else
fm = &namedfm[idx++];
write_one_filemark(fp, fm, '\'', i - NMARKS + '0');
}
--- 1674,1702 ----
idx = NMARKS;
for (i = NMARKS; i < NMARKS + EXTRA_MARKS; i++)
{
! xfmark_T *vi_fm = vi_namedfm != NULL ? &vi_namedfm[vi_idx] : NULL;
!
! if (vi_fm != NULL
! && vi_fm->fmark.mark.lnum != 0
! && (vi_fm->time_set > namedfm[idx].time_set
|| namedfm[idx].fmark.mark.lnum == 0))
! {
! fm = vi_fm;
! ++vi_idx;
! }
else
+ {
fm = &namedfm[idx++];
+ if (vi_fm != NULL
+ && vi_fm->fmark.mark.lnum == fm->fmark.mark.lnum
+ && vi_fm->time_set == fm->time_set
+ && ((vi_fm->fmark.fnum != 0
+ && vi_fm->fmark.fnum == fm->fmark.fnum)
+ || (vi_fm->fname != NULL
+ && fm->fname != NULL
+ && STRCMP(vi_fm->fname, fm->fname) == 0)))
+ ++vi_idx; /* skip duplicate */
+ }
write_one_filemark(fp, fm, '\'', i - NMARKS + '0');
}
*** ../vim-7.4.1937/src/version.c 2016-06-14 22:02:22.014941283 +0200
--- src/version.c 2016-06-14 22:59:14.586289607 +0200
***************
*** 755,756 ****
--- 755,758 ----
{ /* Add new patch number below this line */
+ /**/
+ 1938,
/**/
--
>From "know your smileys":
:-| :-| Deja' vu!
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.