diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-26 22:29:11 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-26 22:29:11 +0200 |
commit | d29459baa61819e59961804ed258efac5733ec70 (patch) | |
tree | 11154e516a0d506808a6bb51d77add58af7d6e16 /src/message.c | |
parent | 257095760732597983bdd026e791907b7980e295 (diff) | |
download | vim-git-d29459baa61819e59961804ed258efac5733ec70.tar.gz |
patch 7.4.2263v7.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/message.c')
-rw-r--r-- | src/message.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/message.c b/src/message.c index f24bc2817..0d1043137 100644 --- a/src/message.c +++ b/src/message.c @@ -2161,8 +2161,12 @@ msg_puts_display( int message_filtered(char_u *msg) { - return cmdmod.filter_regmatch.regprog != NULL - && !vim_regexec(&cmdmod.filter_regmatch, msg, (colnr_T)0); + int match; + + if (cmdmod.filter_regmatch.regprog == NULL) + return FALSE; + match = vim_regexec(&cmdmod.filter_regmatch, msg, (colnr_T)0); + return cmdmod.filter_force ? match : !match; } /* |