lkundrak / rpms / vim

Forked from rpms/vim 4 years ago
Clone
2d32ce7
To: vim_dev@googlegroups.com
2d32ce7
Subject: Patch 7.4.336
2d32ce7
Fcc: outbox
2d32ce7
From: Bram Moolenaar <Bram@moolenaar.net>
2d32ce7
Mime-Version: 1.0
2d32ce7
Content-Type: text/plain; charset=UTF-8
2d32ce7
Content-Transfer-Encoding: 8bit
2d32ce7
------------
2d32ce7
2d32ce7
Patch 7.4.336
2d32ce7
Problem:    Setting 'history' to a big value causes out-of-memory errors.
2d32ce7
Solution:   Limit the value to 10000. (Hirohito Higashi)
2d32ce7
Files:	    runtime/doc/options.txt, src/option.c
2d32ce7
2d32ce7
2d32ce7
*** ../vim-7.4.335/runtime/doc/options.txt	2014-05-28 21:40:47.088329130 +0200
2d32ce7
--- runtime/doc/options.txt	2014-06-25 11:44:16.985950668 +0200
2d32ce7
***************
2d32ce7
*** 3920,3931 ****
2d32ce7
  	NOTE: This option is reset when 'compatible' is set.
2d32ce7
  
2d32ce7
  						*'history'* *'hi'*
2d32ce7
! 'history' 'hi'		number	(Vim default: 20, Vi default: 0)
2d32ce7
  			global
2d32ce7
  			{not in Vi}
2d32ce7
  	A history of ":" commands, and a history of previous search patterns
2d32ce7
! 	are remembered.  This option decides how many entries may be stored in
2d32ce7
  	each of these histories (see |cmdline-editing|).
2d32ce7
  	NOTE: This option is set to the Vi default value when 'compatible' is
2d32ce7
  	set and to the Vim default value when 'compatible' is reset.
2d32ce7
  
2d32ce7
--- 3920,3932 ----
2d32ce7
  	NOTE: This option is reset when 'compatible' is set.
2d32ce7
  
2d32ce7
  						*'history'* *'hi'*
2d32ce7
! 'history' 'hi'		number	(Vim default: 50, Vi default: 0)
2d32ce7
  			global
2d32ce7
  			{not in Vi}
2d32ce7
  	A history of ":" commands, and a history of previous search patterns
2d32ce7
! 	is remembered.  This option decides how many entries may be stored in
2d32ce7
  	each of these histories (see |cmdline-editing|).
2d32ce7
+ 	The maximum value is 10000.
2d32ce7
  	NOTE: This option is set to the Vi default value when 'compatible' is
2d32ce7
  	set and to the Vim default value when 'compatible' is reset.
2d32ce7
  
2d32ce7
*** ../vim-7.4.335/src/option.c	2014-05-13 12:16:44.037555110 +0200
2d32ce7
--- src/option.c	2014-06-25 11:44:48.349951855 +0200
2d32ce7
***************
2d32ce7
*** 1392,1398 ****
2d32ce7
  			    SCRIPTID_INIT},
2d32ce7
      {"history",	    "hi",   P_NUM|P_VIM,
2d32ce7
  			    (char_u *)&p_hi, PV_NONE,
2d32ce7
! 			    {(char_u *)0L, (char_u *)20L} SCRIPTID_INIT},
2d32ce7
      {"hkmap",	    "hk",   P_BOOL|P_VI_DEF|P_VIM,
2d32ce7
  #ifdef FEAT_RIGHTLEFT
2d32ce7
  			    (char_u *)&p_hkmap, PV_NONE,
2d32ce7
--- 1392,1398 ----
2d32ce7
  			    SCRIPTID_INIT},
2d32ce7
      {"history",	    "hi",   P_NUM|P_VIM,
2d32ce7
  			    (char_u *)&p_hi, PV_NONE,
2d32ce7
! 			    {(char_u *)0L, (char_u *)50L} SCRIPTID_INIT},
2d32ce7
      {"hkmap",	    "hk",   P_BOOL|P_VI_DEF|P_VIM,
2d32ce7
  #ifdef FEAT_RIGHTLEFT
2d32ce7
  			    (char_u *)&p_hkmap, PV_NONE,
2d32ce7
***************
2d32ce7
*** 8595,8600 ****
2d32ce7
--- 8595,8605 ----
2d32ce7
  	errmsg = e_positive;
2d32ce7
  	p_hi = 0;
2d32ce7
      }
2d32ce7
+     else if (p_hi > 10000)
2d32ce7
+     {
2d32ce7
+ 	errmsg = e_invarg;
2d32ce7
+ 	p_hi = 10000;
2d32ce7
+     }
2d32ce7
      if (p_re < 0 || p_re > 2)
2d32ce7
      {
2d32ce7
  	errmsg = e_invarg;
2d32ce7
*** ../vim-7.4.335/src/version.c	2014-06-18 21:38:12.216418355 +0200
2d32ce7
--- src/version.c	2014-06-25 11:45:08.141952604 +0200
2d32ce7
***************
2d32ce7
*** 736,737 ****
2d32ce7
--- 736,739 ----
2d32ce7
  {   /* Add new patch number below this line */
2d32ce7
+ /**/
2d32ce7
+     336,
2d32ce7
  /**/
2d32ce7
2d32ce7
-- 
2d32ce7
ARTHUR:    Well, it doesn't matter.  Will you go and tell your master that
2d32ce7
           Arthur from the Court of Camelot is here.
2d32ce7
GUARD #1:  Listen, in order to maintain air-speed velocity, a swallow
2d32ce7
           needs to beat its wings 43 times every second, right?
2d32ce7
ARTHUR:    Please!
2d32ce7
                                  The Quest for the Holy Grail (Monty Python)
2d32ce7
2d32ce7
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
2d32ce7
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
2d32ce7
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
2d32ce7
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///