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