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