]> granicus.if.org Git - vim/commitdiff
patch 7.4.2357 v7.4.2357
authorBram Moolenaar <Bram@vim.org>
Fri, 9 Sep 2016 19:42:36 +0000 (21:42 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 9 Sep 2016 19:42:36 +0000 (21:42 +0200)
Problem:    Attempt to read history entry while not initialized.
Solution:   Skip when the index is negative.

src/ex_getln.c
src/version.c

index 4ff9ae17a2c50e1a349cfba80f370f8ad18f877e..25a12bed3d006c4eef72cf3d5499c904502b9952 100644 (file)
@@ -5762,7 +5762,7 @@ add_to_history(
      */
     if (histype == HIST_SEARCH && in_map)
     {
-       if (maptick == last_maptick)
+       if (maptick == last_maptick && hisidx[HIST_SEARCH] >= 0)
        {
            /* Current line is from the same mapping, remove it */
            hisptr = &history[HIST_SEARCH][hisidx[HIST_SEARCH]];
index baba587cb13447076930720049cf3a6cee3ffb06..de3d5fc970ad78ad5b5ae6370d75c40938967b9f 100644 (file)
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2357,
 /**/
     2356,
 /**/