0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

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.
This commit is contained in:
Bram Moolenaar
2016-08-26 22:29:11 +02:00
parent 2570957607
commit d29459baa6
8 changed files with 68 additions and 6 deletions

View File

@@ -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;
}
/*