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