aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/options.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-12-07 10:17:36 +0800
committerGitHub <noreply@github.com>2024-12-07 02:17:36 +0000
commitec94c2704f5059794923777ed51412d80bd26b5b (patch)
tree5e75aa7277274401f475e3eb1ccc711b7cd2ddc8 /src/nvim/options.lua
parent517ecb85f58ed6ac8b4d5443931612e75e7c7dc2 (diff)
downloadrneovim-ec94c2704f5059794923777ed51412d80bd26b5b.tar.gz
rneovim-ec94c2704f5059794923777ed51412d80bd26b5b.tar.bz2
rneovim-ec94c2704f5059794923777ed51412d80bd26b5b.zip
vim-patch:9.1.0908: not possible to configure :messages (#31492)
Problem: not possible to configure :messages Solution: add the 'messagesopt' option (Shougo Matsushita) closes: vim/vim#16068 https://github.com/vim/vim/commit/51d4d84d6a7159c6ce9e04b36f8edc105ca3794b Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: h_east <h.east.727@gmail.com>
Diffstat (limited to 'src/nvim/options.lua')
-rw-r--r--src/nvim/options.lua49
1 files changed, 33 insertions, 16 deletions
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index 97fe09f376..a5d5a45b59 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -4094,7 +4094,7 @@ return {
desc = [=[
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| and 'msghistory' for
+ each of these histories (see |cmdline-editing| and 'messagesopt' for
the number of messages to remember).
The maximum value is 10000.
]=],
@@ -5449,6 +5449,38 @@ return {
varname = 'p_mis',
},
{
+ abbreviation = 'mopt',
+ cb = 'did_set_messagesopt',
+ defaults = { if_true = 'hit-enter,history:500' },
+ values = { 'hit-enter', 'wait:', 'history:' },
+ flags = true,
+ deny_duplicates = true,
+ desc = [=[
+ Option settings when outputting messages. It can consist of the
+ following items. Items must be separated by a comma.
+
+ hit-enter Use |hit-enter| prompt when the message is longer than
+ 'cmdheight' size.
+
+ wait:{n} Ignored when "hit-enter" is present. Instead of using
+ |hit-enter| prompt, will simply wait for {n}
+ milliseconds so the user has a chance to read the
+ message, use 0 to disable sleep (but then the user may
+ miss an important message).
+
+ history:{n} Determines how many entries are remembered in the
+ |:messages| history. The maximum value is 10000.
+ Setting it to zero clears the message history.
+ ]=],
+ expand_cb = 'expand_set_messagesopt',
+ full_name = 'messagesopt',
+ list = 'onecommacolon',
+ scope = { 'global' },
+ short_desc = N_('options for outputting messages'),
+ type = 'string',
+ varname = 'p_meo',
+ },
+ {
abbreviation = 'msm',
cb = 'did_set_mkspellmem',
defaults = { if_true = '460000,2000,500' },
@@ -5893,21 +5925,6 @@ return {
varname = 'p_mouset',
},
{
- abbreviation = 'mhi',
- cb = 'did_set_msghistory',
- defaults = { if_true = 500 },
- desc = [=[
- Determines how many entries are remembered in the |:messages| history.
- The maximum value is 10000.
- Setting it to zero clears the message history.
- ]=],
- full_name = 'msghistory',
- scope = { 'global' },
- short_desc = N_('how many messages are remembered'),
- type = 'number',
- varname = 'p_mhi',
- },
- {
abbreviation = 'nf',
cb = 'did_set_nrformats',
defaults = { if_true = 'bin,hex' },