From 840f16202e1ae2d574507ef52a7e8a98775f243c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 18 Jan 2022 13:34:05 +0000 Subject: [PATCH] patch 8.2.4133: output of ":scriptnames" goes into the message history 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) --- src/scriptfile.c | 6 +++++- src/testdir/test_scriptnames.vim | 4 ++++ src/version.c | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/scriptfile.c b/src/scriptfile.c index 350813934..159c9fc67 100644 --- a/src/scriptfile.c +++ b/src/scriptfile.c @@ -1652,7 +1652,11 @@ ex_scriptnames(exarg_T *eap) { home_replace(NULL, SCRIPT_ITEM(i)->sn_name, NameBuff, MAXPATHL, TRUE); - smsg("%3d: %s", i, NameBuff); + 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(); } } diff --git a/src/testdir/test_scriptnames.vim b/src/testdir/test_scriptnames.vim index 4712d00a4..44ec14666 100644 --- a/src/testdir/test_scriptnames.vim +++ b/src/testdir/test_scriptnames.vim @@ -23,6 +23,10 @@ func Test_scriptnames() bwipe call delete('Xscripting') + + let msgs = execute('messages') + scriptnames + call assert_equal(msgs, execute('messages')) endfunc " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index 8b9958a47..1e9ab2dd9 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4133, /**/ 4132, /**/ -- 2.40.0