bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking for suggestions on graceful resets


From: Thomas Dickey
Subject: Re: Looking for suggestions on graceful resets
Date: Tue, 18 Dec 2018 04:23:55 -0500
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Dec 17, 2018 at 09:38:49PM -0600, Bryan Christ wrote:
> For the purpose of this question, I'm going to be thinking in terms of
> xterm escape sequences.
> 
> The terminal sequences
> 
> ESC [ 47 h and ESC [ 47 l
> 
> basically switch in and out of normal and alternate buffer modes.  However,
> when an application is using the alternate buffer and crashes, no sequence
> is emitted to indicate that I should switch back to the normal buffer.
> Fortunately, Bash seems to emit a OSC code to set the window title when he

The OSC code is usually in the user's $PS1 string...

> regains control, so I can use that as a clue.  However, that doesn't seem
> like the most graceful way to handle the situation that and i'm not sure
> that other shells would behave so kindly.
> 
> Any suggestions would be appreciated.

none offhand - the alternate screen sequences could be emitted in
a subshell -- I'm unsure how you could decide that the application
is back on the original command line.

-- 
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]