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