dcaee6
To: vim_dev@googlegroups.com
dcaee6
Subject: Patch 7.4.072
dcaee6
Fcc: outbox
dcaee6
From: Bram Moolenaar <Bram@moolenaar.net>
dcaee6
Mime-Version: 1.0
dcaee6
Content-Type: text/plain; charset=UTF-8
dcaee6
Content-Transfer-Encoding: 8bit
dcaee6
------------
dcaee6
dcaee6
Patch 7.4.072
dcaee6
Problem:    Crash when using Insert mode completion.
dcaee6
Solution:   Avoid going past the end of pum_array. (idea by Fransisco Lopes)
dcaee6
Files:      src/popupmnu.c
dcaee6
dcaee6
dcaee6
*** ../vim-7.4.071/src/popupmnu.c	2011-08-17 18:04:28.000000000 +0200
dcaee6
--- src/popupmnu.c	2013-11-02 04:01:06.000000000 +0100
dcaee6
***************
dcaee6
*** 282,287 ****
dcaee6
--- 282,291 ----
dcaee6
      int		round;
dcaee6
      int		n;
dcaee6
  
dcaee6
+     /* Never display more than we have */
dcaee6
+     if (pum_first > pum_size - pum_height)
dcaee6
+ 	pum_first = pum_size - pum_height;
dcaee6
+ 
dcaee6
      if (pum_scrollbar)
dcaee6
      {
dcaee6
  	thumb_heigth = pum_height * pum_height / pum_size;
dcaee6
***************
dcaee6
*** 672,681 ****
dcaee6
  #endif
dcaee6
      }
dcaee6
  
dcaee6
-     /* Never display more than we have */
dcaee6
-     if (pum_first > pum_size - pum_height)
dcaee6
- 	pum_first = pum_size - pum_height;
dcaee6
- 
dcaee6
      if (!resized)
dcaee6
  	pum_redraw();
dcaee6
  
dcaee6
--- 676,681 ----
dcaee6
*** ../vim-7.4.071/src/version.c	2013-11-06 04:01:31.000000000 +0100
dcaee6
--- src/version.c	2013-11-06 04:03:18.000000000 +0100
dcaee6
***************
dcaee6
*** 740,741 ****
dcaee6
--- 740,743 ----
dcaee6
  {   /* Add new patch number below this line */
dcaee6
+ /**/
dcaee6
+     72,
dcaee6
  /**/
dcaee6
dcaee6
-- 
dcaee6
No children may attend school with their breath smelling of "wild onions."
dcaee6
		[real standing law in West Virginia, United States of America]
dcaee6
dcaee6
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
dcaee6
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
dcaee6
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
dcaee6
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///