Hi,

2020/2/7 Fri 18:19:53 UTC+9 Ken Takata wrote:
>
> Hi,
>
> `:help :!` says:
>
>             Vim redraws the screen after the command is finished,
>             because it may have printed any text.  This requires a
>             hit-enter prompt, so that you can read any messages.
>             To avoid this use: >
>                 :silent !{cmd}
> <            The screen is not redrawn then, thus you have to use
>             CTRL-L or ":redraw!" if the command did display
>             something.
>
> However, I think this is not accurate.
>
> If 't_ti' and 't_te' are set to empty, then `:silent !{cmd}` keeps showing 
> the
> output of the command. User needs to use CTRL-L to show the Vim screen 
> again.
> (This behavior matches the help.)
>
> On the other hand, if 't_ti' and 't_te' are set to default, Vim uses 
> alternate
> screen, then `:silent !{cmd}` shows a blank screen after the execution of 
> the
> command (even the command didn't display anything). User still needs to use
> CTRL-L to show the Vim screen again.
> This behavior differs from the help, and I don't think it is useful at 
> all. 
> How about restoring the Vim screen automatically when alternate screen is
> enabled? E.g.:
>
> --- a/src/ex_cmds.c
> +++ b/src/ex_cmds.c
> @@ -1469,6 +1469,8 @@ do_shell(
>          wait_return(term_console ? -1 : msg_silent == 0); // see below
>  # else
>          wait_return(msg_silent == 0);
> +        if (swapping_screen() && msg_silent > 0)
> +            redraw_later_clear();
>  # endif
>          no_wait_return = save_nwr;
>          }
>
>
> The help should be also updated.
>

Hmm, it seems that Google Groups' Web interface automatically expands tabs 
into spaces.
I attached the correct patch.

Regards,
Ken Takata

-- 
-- 
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/b4f79029-78d2-42e4-bc6d-2f0b2250f957%40googlegroups.com.
# HG changeset patch
# Parent  27e92debb9725d72601e4c20b897978f7d3018c4

diff --git a/src/ex_cmds.c b/src/ex_cmds.c
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1469,6 +1469,8 @@ do_shell(
 		wait_return(term_console ? -1 : msg_silent == 0); // see below
 # else
 		wait_return(msg_silent == 0);
+		if (swapping_screen() && msg_silent > 0)
+		    redraw_later_clear();
 # endif
 		no_wait_return = save_nwr;
 	    }

Raspunde prin e-mail lui