summaryrefslogtreecommitdiff
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-10-15 15:39:39 +0200
committerBram Moolenaar <Bram@vim.org>2016-10-15 15:39:39 +0200
commit9e507ca8a3e1535e62de4bd86374b0fcd18ef5b8 (patch)
treed0b3d306fa30c4ad65d2f5e266488dee43644167 /src/ex_docmd.c
parenta6c27ee6db2c328e0ab0e6d143e2a295a0bb9c9a (diff)
downloadvim-git-9e507ca8a3e1535e62de4bd86374b0fcd18ef5b8.tar.gz
patch 8.0.0034v8.0.0034
Problem: No completion for ":messages". Solution: Complete "clear" argument. (Hirohito Higashi)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index ac7beb7c5..6802b8b3d 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -4281,6 +4281,11 @@ set_one_cmd_context(
xp->xp_pattern = arg;
break;
+ case CMD_messages:
+ xp->xp_context = EXPAND_MESSAGES;
+ xp->xp_pattern = arg;
+ break;
+
#if defined(FEAT_CMDHIST)
case CMD_history:
xp->xp_context = EXPAND_HISTORY;
@@ -5893,6 +5898,7 @@ static struct
#endif
{EXPAND_MAPPINGS, "mapping"},
{EXPAND_MENUS, "menu"},
+ {EXPAND_MESSAGES, "messages"},
{EXPAND_OWNSYNTAX, "syntax"},
#if defined(FEAT_PROFILE)
{EXPAND_SYNTIME, "syntime"},
@@ -11901,6 +11907,18 @@ get_behave_arg(expand_T *xp UNUSED, int idx)
return (char_u *)"xterm";
return NULL;
}
+
+/*
+ * Function given to ExpandGeneric() to obtain the possible arguments of the
+ * ":messages {clear}" command.
+ */
+ char_u *
+get_messages_arg(expand_T *xp UNUSED, int idx)
+{
+ if (idx == 0)
+ return (char_u *)"clear";
+ return NULL;
+}
#endif
#ifdef FEAT_AUTOCMD