-*message.txt* For Vim version 9.1. Last change: 2024 Mar 13
+*message.txt* For Vim version 9.1. Last change: 2024 Nov 14
VIM REFERENCE MANUAL by Bram Moolenaar
Clear messages, keeping only the {count} most
recent ones.
-The number of remembered messages is fixed at 200.
+The number of remembered messages is determined by the 'msghistory' option.
*g<*
The "g<" command can be used to see the last page of previous command output.
global
A history of ":" commands, and a history of previous search patterns
is remembered. This option decides how many entries may be stored in
- each of these histories (see |cmdline-editing|).
+ each of these histories (see |cmdline-editing| and 'msghistory' for
+ the number of messages to remember).
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.
time in msec between two mouse clicks for the second click to be
recognized as a multi click.
+ *'msghistory'* *'mhi'*
+'msghistory' 'mhi' number (default 500)
+ global
+ Determines how many entries are remembered in the |:messages| history.
+ The maximum value is 10000.
+
*'mzquantum'* *'mzq'*
'mzquantum' 'mzq' number (default 100)
global
'mesg' vi_diff.txt /*'mesg'*
'mfd' options.txt /*'mfd'*
'mh' options.txt /*'mh'*
+'mhi' options.txt /*'mhi'*
'mis' options.txt /*'mis'*
'mkspellmem' options.txt /*'mkspellmem'*
'ml' options.txt /*'ml'*
'mousetime' options.txt /*'mousetime'*
'mp' options.txt /*'mp'*
'mps' options.txt /*'mps'*
+'msghistory' options.txt /*'msghistory'*
'msm' options.txt /*'msm'*
'mzq' options.txt /*'mzq'*
'mzquantum' options.txt /*'mzquantum'*
-*version9.txt* For Vim version 9.1. Last change: 2024 Nov 11
+*version9.txt* For Vim version 9.1. Last change: 2024 Nov 14
VIM REFERENCE MANUAL by Bram Moolenaar
popup
'findfunc' Vim function to obtain the results for a |:find|
command
+'msghistory' Max number of messages to remember
'winfixbuf' Keep buffer focused in a window
'tabclose' Which tab page to focus after closing a tab page
't_xo' Terminal uses XON/XOFF handshaking (e.g. vt420)
call <SID>BinOptionG("terse", &terse)
call <SID>AddOption("shortmess", gettext("list of flags to make messages shorter"))
call <SID>OptionG("shm", &shm)
+call <SID>AddOption("msghistory", gettext("how many messages are remembered"))
+call append("$", " \tset mhi=" . &mhi)
call <SID>AddOption("showcmd", gettext("show (partial) command keys in location given by 'showcmdloc'"))
let &sc = s:old_sc
call <SID>BinOptionG("sc", &sc)
* main window area.
*/
-/*
- * Message history is fixed at 200 messages.
- */
-#define MAX_MSG_HIST_LEN 200
-
/*
* +folding Fold lines.
*/
return;
// Don't let the message history get too big
- while (msg_hist_len > MAX_MSG_HIST_LEN)
+ while (msg_hist_len > p_mhi)
(void)delete_first_msg();
// allocate an entry and add the message at the end of the history
errmsg = e_invalid_argument;
p_hi = 10000;
}
+ if (p_mhi < 0)
+ {
+ errmsg = e_argument_must_be_positive;
+ p_mhi = 0;
+ }
+ else if (p_mhi > 10000)
+ {
+ errmsg = e_invalid_argument;
+ p_mhi = 10000;
+ }
if (p_re < 0 || p_re > 2)
{
errmsg = e_invalid_argument;
#endif
EXTERN long p_mouset; // 'mousetime'
EXTERN int p_more; // 'more'
+EXTERN long p_mhi; // 'msghistory'
#ifdef FEAT_MZSCHEME
EXTERN long p_mzq; // 'mzquantum
# if defined(DYNAMIC_MZSCHEME)
{"mousetime", "mouset", P_NUM|P_VI_DEF,
(char_u *)&p_mouset, PV_NONE, NULL, NULL,
{(char_u *)500L, (char_u *)0L} SCTX_INIT},
+ {"msghistory","mhi", P_NUM|P_VI_DEF,
+ (char_u *)&p_mhi, PV_NONE, NULL, NULL,
+ {(char_u *)500L, (char_u *)0L} SCTX_INIT},
{"mzquantum", "mzq", P_NUM,
#ifdef FEAT_MZSCHEME
(char_u *)&p_mzq, PV_NONE, did_set_mzquantum, NULL,
\ 'imstyle': [[0, 1], [-1, 2, 999]],
\ 'lines': [[2, 24, 1000], [-1, 0, 1]],
\ 'linespace': [[-1, 0, 2, 4, 999], ['']],
+ \ 'msghistory': [[0, 1, 100, 10000], [-1, 10001]],
\ 'numberwidth': [[1, 4, 8, 10, 11, 20], [-1, 0, 21]],
\ 'regexpengine': [[0, 1, 2], [-1, 3, 999]],
\ 'report': [[0, 1, 2, 9999], [-1]],
call assert_fails('set backupcopy=', 'E474:')
call assert_fails('set regexpengine=3', 'E474:')
call assert_fails('set history=10001', 'E474:')
+ call assert_fails('set msghistory=10001', 'E474:')
call assert_fails('set numberwidth=21', 'E474:')
call assert_fails('set colorcolumn=-a', 'E474:')
call assert_fails('set colorcolumn=a', 'E474:')
endif
call assert_fails('set helpheight=-1', 'E487:')
call assert_fails('set history=-1', 'E487:')
+ call assert_fails('set msghistory=-1', 'E487:')
call assert_fails('set report=-1', 'E487:')
call assert_fails('set shiftwidth=-1', 'E487:')
call assert_fails('set sidescroll=-1', 'E487:')
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 864,
/**/
863,
/**/