From c415e764d424251bb8139dcdd793b7b716aec563 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 10 Feb 2022 07:28:54 +0800 Subject: vim-patch:8.2.4336: using :filter for :scriptnames does not work Problem: Using :filter for :scriptnames does not work. (Ben Jackson) Solution: Call message_filtered(). (closes vim/vim#9720) https://github.com/vim/vim/commit/769f5895ebfd10535a0ad978f071da8f20178fc6 Cherry-pick a modeline from Vim patch 8.2.1432. --- src/nvim/ex_cmds2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/nvim/ex_cmds2.c') diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index e5cec0e060..090422088a 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -12,6 +12,7 @@ #include #include "nvim/ascii.h" +#include "nvim/globals.h" #include "nvim/vim.h" #ifdef HAVE_LOCALE_H # include @@ -2190,9 +2191,11 @@ void ex_scriptnames(exarg_T *eap) if (SCRIPT_ITEM(i).sn_name != NULL) { home_replace(NULL, SCRIPT_ITEM(i).sn_name, NameBuff, MAXPATHL, true); vim_snprintf((char *)IObuff, IOSIZE, "%3d: %s", i, NameBuff); - msg_putchar('\n'); - msg_outtrans(IObuff); - line_breakcheck(); + if (!message_filtered(IObuff)) { + msg_putchar('\n'); + msg_outtrans(IObuff); + line_breakcheck(); + } } } } -- cgit