]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.072 v7.4.072
authorBram Moolenaar <Bram@vim.org>
Wed, 6 Nov 2013 03:04:33 +0000 (04:04 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 6 Nov 2013 03:04:33 +0000 (04:04 +0100)
Problem:    Crash when using Insert mode completion.
Solution:   Avoid going past the end of pum_array. (idea by Fransisco Lopes)

src/popupmnu.c
src/version.c

index 44ed878045d0808cc2f7a38b191c7391d5e420d0..8ff0711cc52f26360707ce04f300ab64acf76da2 100644 (file)
@@ -282,6 +282,10 @@ pum_redraw()
     int                round;
     int                n;
 
+    /* Never display more than we have */
+    if (pum_first > pum_size - pum_height)
+       pum_first = pum_size - pum_height;
+
     if (pum_scrollbar)
     {
        thumb_heigth = pum_height * pum_height / pum_size;
@@ -672,10 +676,6 @@ pum_set_selected(n, repeat)
 #endif
     }
 
-    /* Never display more than we have */
-    if (pum_first > pum_size - pum_height)
-       pum_first = pum_size - pum_height;
-
     if (!resized)
        pum_redraw();
 
index 69e8fbd6c260567ceaf59424583b5e048a58d2d9..4276558b5f039067fc85a6b0452d3a8828d68f84 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    72,
 /**/
     71,
 /**/