To: vim_dev@googlegroups.com Subject: Patch 8.2.4336 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4336 Problem: Using :filter for :scriptnames does not work. (Ben Jackson) Solution: Call message_filtered(). (closes #9720) Files: src/scriptfile.c, src/testdir/test_filter_cmd.vim *** ../vim-8.2.4335/src/scriptfile.c 2022-01-31 17:26:00.598083148 +0000 --- src/scriptfile.c 2022-02-09 14:30:35.816054771 +0000 *************** *** 1658,1667 **** i, si->sn_state == SN_STATE_NOT_LOADED ? " A" : "", NameBuff); ! msg_putchar('\n'); ! msg_outtrans(IObuff); ! out_flush(); // output one line at a time ! ui_breakcheck(); } } } --- 1658,1670 ---- i, si->sn_state == SN_STATE_NOT_LOADED ? " A" : "", NameBuff); ! if (!message_filtered(IObuff)) ! { ! msg_putchar('\n'); ! msg_outtrans(IObuff); ! out_flush(); // output one line at a time ! ui_breakcheck(); ! } } } } *** ../vim-8.2.4335/src/testdir/test_filter_cmd.vim 2020-08-12 17:50:31.875655822 +0100 --- src/testdir/test_filter_cmd.vim 2022-02-09 14:23:36.212381853 +0000 *************** *** 190,193 **** --- 190,199 ---- bwipe! endfunc + func Test_filter_scriptnames() + let lines = split(execute('filter /test_filter_cmd/ scriptnames'), "\n") + call assert_equal(1, len(lines)) + call assert_match('filter_cmd', lines[0]) + endfunc + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.4335/src/version.c 2022-02-09 12:58:16.502258779 +0000 --- src/version.c 2022-02-09 14:20:22.028484036 +0000 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4336, /**/ -- If Pacman had affected us as kids we'd be running around in dark rooms, munching pills and listening to repetitive music. -- Marcus Brigstocke /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///