This is the mail archive of the cygwin-patches mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] Cygwin: pty: Disable clear screen on new pty if TERM=dumb or emacs*.

On 9/4/2019 10:42 AM, Takashi Yano wrote:
> On Wed, 4 Sep 2019 15:55:03 +0200
> Corinna Vinschen wrote:
>> The code in fixup_after_attach() is the only code snippet setting
>> need_clear_screen = true.  And that code also requires term != "dump" &&
>> term == "*emacs*" to set need_clear_screen.
> term != "*emacs*"
>> The code in reset_switch_to_pcon() requires that the need_clear_screen
>> flag is true regardless of checking TERM.  So this code depends on the
>> successful TERM check from fixup_after_attach anyway.
>> What am I missing?
> Two checking results may not be the same. Indeed, emacs changes
> TERM between two checks.
> fixup_after_attach() is called from fixup_after_exec(),
> which is called before executing the program code.
> reset_switch_to_pcon () is mainly called from PTY slave I/O functions.
> This is usually from the program code.

But the first check (the one in fixup_after_attach()) could be dropped, couldn't it?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]