diff src/ex_cmds.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 baad324e9fbc
children 5fc4bec66c33
line wrap: on
line diff
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2918,6 +2918,10 @@ print_line(linenr_T lnum, int use_number
 {
     int		save_silent = silent_mode;
 
+    /* apply :filter /pat/ */
+    if (message_filtered(ml_get(lnum)))
+	return;
+
     msg_start();
     silent_mode = FALSE;
     info_message = TRUE;	/* use mch_msg(), not mch_errmsg() */