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
signature.asc
Description: PGP signature