]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.3.903 v7.3.903
authorBram Moolenaar <Bram@vim.org>
Mon, 15 Apr 2013 14:14:22 +0000 (16:14 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 15 Apr 2013 14:14:22 +0000 (16:14 +0200)
Problem:    Crash on exit writing viminfo. (Ron Aaron)
Solution:   Check for the history to be empty.

src/ex_getln.c
src/version.c

index c16c1ab38072c7aece47c71a76684c3d1fc0ea15..a7a1409b0ab2fc175de94bca4783af73420159f6 100644 (file)
@@ -6216,7 +6216,15 @@ write_viminfo_history(fp)
         */
        for (round = 1; round <= 2; ++round)
        {
-           i = round == 1 ? hisidx[type] : 0;
+           if (round == 1)
+               /* start at newest entry, somewhere in the list */
+               i = hisidx[type];
+           else if (viminfo_hisidx[type] > 0)
+               /* start at newest entry, first in the list */
+               i = 0;
+           else
+               /* empty list */
+               i = -1;
            if (i >= 0)
                while (num_saved > 0
                        && !(round == 2 && i >= viminfo_hisidx[type]))
index edeab45a37da7fb3fa4d47affb309ad06821fe98..cf06da600821a8729f0a8f7eb0ef6e162adc757b 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    903,
 /**/
     902,
 /**/