changeset 5444:d563839a9be0 v7.4.072

updated for version 7.4.072 Problem: Crash when using Insert mode completion. Solution: Avoid going past the end of pum_array. (idea by Fransisco Lopes)
author Bram Moolenaar <bram@vim.org>
date Wed, 06 Nov 2013 04:04:33 +0100
parents 01088dac6308
children 75c7eef1de70
files src/popupmnu.c src/version.c
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -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();
 
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    72,
+/**/
     71,
 /**/
     70,