]> granicus.if.org Git - vim/commitdiff
patch 7.4.1931 v7.4.1931
authorBram Moolenaar <Bram@vim.org>
Mon, 13 Jun 2016 19:16:03 +0000 (21:16 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 13 Jun 2016 19:16:03 +0000 (21:16 +0200)
Problem:    Using both old and new style file mark lines from viminfo.
Solution:   Skip the old style lines if the viminfo file was written with a
            Vim version that supports the new style.

src/ex_cmds.c
src/version.c

index 519f40c16772286ef1fe570f3fb4073dbf7c3ecc..ec405cb432f32fe0f8ed82a4c45cef9bdac5012a 100644 (file)
@@ -2310,7 +2310,11 @@ read_viminfo_up_to_marks(
                break;
            case '-':
            case '\'':
-               eof = read_viminfo_filemark(virp, forceit);
+               /* When file marks are in bar lines skip the old style lines. */
+               if (virp->vir_version < VIMINFO_VERSION_WITH_MARKS)
+                   eof = read_viminfo_filemark(virp, forceit);
+               else
+                   eof = viminfo_readline(virp);
                break;
            default:
                if (viminfo_error("E575: ", _("Illegal starting char"),
index b58bc3c345dc3146e0b0c897251546ca540b7599..977cb1a80d1794e77222a9e83d912b4b8ab0bb89 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1931,
 /**/
     1930,
 /**/