From: Bram Moolenaar Date: Wed, 6 Nov 2013 03:04:33 +0000 (+0100) Subject: updated for version 7.4.072 X-Git-Tag: v7.4.072 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c1e626103397f8ac84ab7ca29cc74d0b3cc06e6;p=thirdparty%2Fvim.git 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) --- diff --git a/src/popupmnu.c b/src/popupmnu.c index 44ed878045..8ff0711cc5 100644 --- 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(); diff --git a/src/version.c b/src/version.c index 69e8fbd6c2..4276558b5f 100644 --- a/src/version.c +++ b/src/version.c @@ -738,6 +738,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 72, /**/ 71, /**/