For the purpose of this question, I'm going to be thinking in terms of xterm escape 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 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.
--
Bryan
<><