summaryrefslogtreecommitdiff
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-08-26 22:29:11 +0200
committerBram Moolenaar <Bram@vim.org>2016-08-26 22:29:11 +0200
commitd29459baa61819e59961804ed258efac5733ec70 (patch)
tree11154e516a0d506808a6bb51d77add58af7d6e16 /src/ex_docmd.c
parent257095760732597983bdd026e791907b7980e295 (diff)
downloadvim-d29459baa61819e59961804ed258efac5733ec70.zip
patch 7.4.2263
Problem: :filter does not work for many commands. Can only get matching messages. Solution: Make :filter work for :command, :map, :list, :number and :print. Make ":filter!" show non-matching lines.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 94216b371..44f6c1e3b 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -1925,6 +1925,13 @@ do_one_cmd(
if (!checkforcmd(&p, "filter", 4)
|| *p == NUL || ends_excmd(*p))
break;
+ if (*p == '!')
+ {
+ cmdmod.filter_force = TRUE;
+ p = skipwhite(p + 1);
+ if (*p == NUL || ends_excmd(*p))
+ break;
+ }
p = skip_vimgrep_pat(p, &reg_pat, NULL);
if (p == NULL || *p == NUL)
break;
@@ -5928,8 +5935,10 @@ uc_list(char_u *name, size_t name_len)
cmd = USER_CMD_GA(gap, i);
a = (long)cmd->uc_argt;
- /* Skip commands which don't match the requested prefix */
- if (STRNCMP(name, cmd->uc_name, name_len) != 0)
+ /* Skip commands which don't match the requested prefix and
+ * commands filtered out. */
+ if (STRNCMP(name, cmd->uc_name, name_len) != 0
+ || message_filtered(cmd->uc_name))
continue;
/* Put out the title first time */