Mercurial > vim
diff src/message.c @ 9980:b222552cf0c4 v7.4.2263
commit https://github.com/vim/vim/commit/d29459baa61819e59961804ed258efac5733ec70
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 26 22:29:11 2016 +0200
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 26 Aug 2016 22:30:07 +0200 |
parents | e975914c17e9 |
children | 9bef7b5d02cb |
line wrap: on
line diff
--- 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; } /*