mirror of
https://github.com/neovim/neovim.git
synced 2026-06-15 16:23:48 +00:00
fix(messages): no prompt/newlines for ext_messages filter command #39786)
Problem: Redundant newlines and "Press any key" prompt with ext_messages
for Visual filter command.
Solution: Remove newlines and prompt with ext_messages.
This commit is contained in:
@@ -1339,7 +1339,7 @@ static void do_filter(linenr_T line1, linenr_T line2, exarg_T *eap, char *cmd, b
|
||||
goto filterend;
|
||||
}
|
||||
|
||||
if (!do_out) {
|
||||
if (!do_out && !ui_has(kUIMessages)) {
|
||||
msg_putchar('\n');
|
||||
}
|
||||
|
||||
@@ -1446,7 +1446,9 @@ error:
|
||||
// put cursor back in same position for ":w !cmd"
|
||||
curwin->w_cursor = cursor_save;
|
||||
no_wait_return--;
|
||||
wait_return(false);
|
||||
if (!ui_has(kUIMessages)) {
|
||||
wait_return(false);
|
||||
}
|
||||
}
|
||||
|
||||
filterend:
|
||||
|
||||
@@ -729,7 +729,9 @@ int call_shell(char *cmd, int opts, char *extra_shell_arg)
|
||||
if (p_verbose > 3) {
|
||||
verbose_enter();
|
||||
smsg(0, _("Executing command: \"%s\""), cmd == NULL ? p_sh : cmd);
|
||||
msg_putchar('\n');
|
||||
if (!ui_has(kUIMessages)) {
|
||||
msg_putchar('\n');
|
||||
}
|
||||
verbose_leave();
|
||||
}
|
||||
|
||||
|
||||
@@ -383,6 +383,16 @@ describe('messages2', function()
|
||||
]])
|
||||
end)
|
||||
|
||||
it('no prompt and newlines with Visual filter command #38273', function()
|
||||
set_msg_target_zero_ch()
|
||||
feed('V:w !printf foo<CR>')
|
||||
screen:expect([[
|
||||
^ |
|
||||
{1:~ }|*12
|
||||
{1:~ }{4:foo}|
|
||||
]])
|
||||
end)
|
||||
|
||||
it('empty kind after message that does not flush immediately', function()
|
||||
command('echon "foo" | echo')
|
||||
screen:expect([[
|
||||
|
||||
Reference in New Issue
Block a user