Re: How screen content saving handled in xterm case?


On Mon, 2 Sep 2013 11:44:42 +0200
Egmont Koblinger <egmont gmail com> wrote:

I think you're looking for "alternate screen buffer".

Holy cow! Yeah, I saw this, but nowhere the docs says that content is
saved in these buffers when switching. And trying it, when switching
from normal to alt then back to normal, normal's content is saved. But
from alt to normal, back to alt, alt's content is lost (buf cleared).
Holy cow!

Whoever will bang their head on this, the sequences to try in shell are:

Switch to alt buffer:
echo -e "\E[?47h"

Back to normal:
echo -e "\E[?47l"

In mc, this is handled in win.c do_enter_ca_mode(), do_exit_ca_mode(),
which are of course very insightful names for this kind of stuff.

Thanks much!


On Mon, Sep 2, 2013 at 11:39 AM, Paul Sokolovsky <pmiscml gmail com>


Yesterday I spent couple of hours trying to trace how shell screen
content is working in case of xterm terminal. While handling in
case of linux console is very visible, and otherwise there're some
checks for xterm/rxvt stuff, but I couldn't find exact escape
sequence(s)/exact place where saving is done in case of xterm.

I also tried to approach it from the other side, by looking at xterm
escape sequences docs, ,
and neither could find something which is clearly usable for screen
saving, like command "read char/rect".

So, any hints how that magic is done? What I'm trying to do is to
figure out why Android terminal emulators don't save screen content
with mc.

 Paul                          mailto:pmiscml gmail com
mc-devel mailing list

Best regards,
 Paul                          mailto:pmiscml gmail com

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