0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

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)
This commit is contained in:
Bram Moolenaar 2013-11-06 04:04:33 +01:00
parent 84dbb62fca
commit 4c1e626103
2 changed files with 6 additions and 4 deletions

View 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();

View File

@ -738,6 +738,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
72,
/**/
71,
/**/