vim-patch:8.0.0034

Problem:    No completion for ":messages".
Solution:   Complete "clear" argument. (Hirohito Higashi)

9e507ca8a3
This commit is contained in:
Jurica Bradaric
2017-07-25 18:30:28 +02:00
parent 5a0acd09c1
commit 811c45163c
7 changed files with 27 additions and 1 deletions

View File

@@ -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;