[PATCH 2/2] Cygwin: pty: Disable clear screen on new pty if TERM=dumb or emacs*.
Corinna Vinschen
corinna-cygwin@cygwin.com
Wed Sep 4 10:47:00 GMT 2019
On Sep 4 10:46, Takashi Yano wrote:
> - Pseudo console support introduced by commit
> 169d65a5774acc76ce3f3feeedcbae7405aa9b57 shows garbage ^[[H^[[J in
> some of emacs screens. These screens do not handle ANSI escape
> sequences. Therefore, clear screen is disabled on these screens.
> ---
> winsup/cygwin/fhandler_tty.cc | 26 +++++++++++++++++++-------
> winsup/cygwin/tty.cc | 1 +
> winsup/cygwin/tty.h | 1 +
> 3 files changed, 21 insertions(+), 7 deletions(-)
>
> diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
> index 283558985..a74c3eecf 100644
> --- a/winsup/cygwin/fhandler_tty.cc
> +++ b/winsup/cygwin/fhandler_tty.cc
> @@ -972,6 +972,19 @@ skip_console_setting:
> void
> fhandler_pty_slave::reset_switch_to_pcon (void)
> {
> + if (get_ttyp ()->need_clear_screen)
> + {
> + const char *term = getenv ("TERM");
> + if (term && strcmp (term, "dumb") && !strstr (term, "emacs"))
Why do you check the TERMs again here? After all, need_clear_screen
is only true if one of these terms are used.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20190904/ab8d7085/attachment.sig>
More information about the Cygwin-patches
mailing list