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 44ed878..8ff0711 100644
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -282,6 +282,10 @@
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 @@
#endif
}
- /* Never display more than we have */
- if (pum_first > pum_size - pum_height)
- pum_first = pum_size - pum_height;
-
if (!resized)
pum_redraw();