To: vim_dev@googlegroups.com Subject: Patch 8.2.4133 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4133 Problem: output of ":scriptnames" goes into the message history, while this des not happen for other commands, such as ":ls". Solution: Use msg_outtrans() instead of smsg(). (closes #9551) Files: src/scriptfile.c, src/testdir/test_scriptnames.vim *** ../vim-8.2.4132/src/scriptfile.c 2022-01-16 11:11:56.382111551 +0000 --- src/scriptfile.c 2022-01-18 13:33:41.151887244 +0000 *************** *** 1652,1658 **** { home_replace(NULL, SCRIPT_ITEM(i)->sn_name, NameBuff, MAXPATHL, TRUE); ! smsg("%3d: %s", i, NameBuff); } } --- 1652,1662 ---- { 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); ! out_flush(); // output one line at a time ! ui_breakcheck(); } } *** ../vim-8.2.4132/src/testdir/test_scriptnames.vim 2020-08-12 17:50:31.883655785 +0100 --- src/testdir/test_scriptnames.vim 2022-01-18 13:32:20.279973467 +0000 *************** *** 23,28 **** --- 23,32 ---- bwipe call delete('Xscripting') + + let msgs = execute('messages') + scriptnames + call assert_equal(msgs, execute('messages')) endfunc " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.4132/src/version.c 2022-01-18 13:14:44.069194847 +0000 --- src/version.c 2022-01-18 13:29:54.876131173 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4133, /**/ -- ARTHUR: You fight with the strength of many men, Sir knight. I am Arthur, King of the Britons. [pause] I seek the finest and the bravest knights in the land to join me in my Court of Camelot. [pause] You have proved yourself worthy; will you join me? [pause] You make me sad. So be it. Come, Patsy. BLACK KNIGHT: None shall pass. The Quest for the Holy Grail (Monty Python) /// 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 ///