Problem: Setting 'history' to a big value causes out-of-memory errors.
Solution: Limit the value to 10000. (Hirohito Higashi)
NOTE: This option is reset when 'compatible' is set.
*'history'* *'hi'*
-'history' 'hi' number (Vim default: 20, Vi default: 0)
+'history' 'hi' number (Vim default: 50, Vi default: 0)
global
{not in Vi}
A history of ":" commands, and a history of previous search patterns
- are remembered. This option decides how many entries may be stored in
+ is remembered. This option decides how many entries may be stored in
each of these histories (see |cmdline-editing|).
+ The maximum value is 10000.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
SCRIPTID_INIT},
{"history", "hi", P_NUM|P_VIM,
(char_u *)&p_hi, PV_NONE,
- {(char_u *)0L, (char_u *)20L} SCRIPTID_INIT},
+ {(char_u *)0L, (char_u *)50L} SCRIPTID_INIT},
{"hkmap", "hk", P_BOOL|P_VI_DEF|P_VIM,
#ifdef FEAT_RIGHTLEFT
(char_u *)&p_hkmap, PV_NONE,
errmsg = e_positive;
p_hi = 0;
}
+ else if (p_hi > 10000)
+ {
+ errmsg = e_invarg;
+ p_hi = 10000;
+ }
if (p_re < 0 || p_re > 2)
{
errmsg = e_invarg;
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 336,
/**/
335,
/**/