Merge pull request #17136 from zeertzjq/vim-8.2.4133

vim-patch:8.2.4133: output of ":scriptnames" goes into the message history
This commit is contained in:
bfredl 2022-01-27 13:43:27 +01:00 committed by GitHub
commit 7ea09dde5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -2323,9 +2323,11 @@ void ex_scriptnames(exarg_T *eap)
for (int i = 1; i <= script_items.ga_len && !got_int; i++) {
if (SCRIPT_ITEM(i).sn_name != NULL) {
home_replace(NULL, SCRIPT_ITEM(i).sn_name,
NameBuff, MAXPATHL, true);
smsg("%3d: %s", i, NameBuff);
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();
}
}
}

View File

@ -23,4 +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