Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
9979:782064bf4bc1 | 9980:b222552cf0c4 |
---|---|
2159 * "pattern". | 2159 * "pattern". |
2160 */ | 2160 */ |
2161 int | 2161 int |
2162 message_filtered(char_u *msg) | 2162 message_filtered(char_u *msg) |
2163 { | 2163 { |
2164 return cmdmod.filter_regmatch.regprog != NULL | 2164 int match; |
2165 && !vim_regexec(&cmdmod.filter_regmatch, msg, (colnr_T)0); | 2165 |
2166 if (cmdmod.filter_regmatch.regprog == NULL) | |
2167 return FALSE; | |
2168 match = vim_regexec(&cmdmod.filter_regmatch, msg, (colnr_T)0); | |
2169 return cmdmod.filter_force ? match : !match; | |
2166 } | 2170 } |
2167 | 2171 |
2168 /* | 2172 /* |
2169 * Scroll the screen up one line for displaying the next message line. | 2173 * Scroll the screen up one line for displaying the next message line. |
2170 */ | 2174 */ |