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.
diff --git a/src/message.c b/src/message.c
index f24bc28..0d10431 100644
--- a/src/message.c
+++ b/src/message.c
@@ -2161,8 +2161,12 @@
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;
}
/*