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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220209143220.9870C1C1905%40moolenaar.net.

Raspunde prin e-mail lui