diff options
author | Jurica Bradaric <jbradaric@gmail.com> | 2017-07-25 18:30:28 +0200 |
---|---|---|
committer | Jurica Bradaric <jbradaric@gmail.com> | 2017-07-25 18:41:14 +0200 |
commit | 811c45163c5613981c8e5abdca40e28c1b61d076 (patch) | |
tree | c6d5dc0ab668e1c07b1fc12e771c702a2ae81987 /src/nvim/ex_docmd.c | |
parent | 5a0acd09c106fb3cee4243aa366ee1eff04776fd (diff) | |
download | rneovim-811c45163c5613981c8e5abdca40e28c1b61d076.tar.gz rneovim-811c45163c5613981c8e5abdca40e28c1b61d076.tar.bz2 rneovim-811c45163c5613981c8e5abdca40e28c1b61d076.zip |
vim-patch:8.0.0034
Problem: No completion for ":messages".
Solution: Complete "clear" argument. (Hirohito Higashi)
https://github.com/vim/vim/commit/9e507ca8a3e1535e62de4bd86374b0fcd18ef5b8
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index d2eb881bc6..99a0b86d2b 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -3440,6 +3440,11 @@ const char * set_one_cmd_context( xp->xp_pattern = (char_u *)arg; break; + case CMD_messages: + xp->xp_context = EXPAND_MESSAGES; + xp->xp_pattern = (char_u *)arg; + break; + case CMD_history: xp->xp_context = EXPAND_HISTORY; xp->xp_pattern = (char_u *)arg; @@ -4874,6 +4879,7 @@ static struct { #endif { EXPAND_MAPPINGS, "mapping" }, { EXPAND_MENUS, "menu" }, + { EXPAND_MESSAGES, "messages" }, { EXPAND_OWNSYNTAX, "syntax" }, { EXPAND_SYNTIME, "syntime" }, { EXPAND_SETTINGS, "option" }, @@ -9595,6 +9601,16 @@ char_u *get_behave_arg(expand_T *xp, int idx) return NULL; } +// Function given to ExpandGeneric() to obtain the possible arguments of the +// ":messages {clear}" command. +char_u *get_messages_arg(expand_T *xp FUNC_ATTR_UNUSED, int idx) +{ + if (idx == 0) { + return (char_u *)"clear"; + } + return NULL; +} + static TriState filetype_detect = kNone; static TriState filetype_plugin = kNone; static TriState filetype_indent = kNone; |