On Mon, Jun 11, 2012 at 03:03:13AM +0200, John Spencer wrote:
> in other words: if your term height is 25 lines, and you do: seq 50,
> then open a file in vi, then exit, you will have 1-25 still in your
> scrollback buffer, but 26-50 are lost.
> 
> the usual ncurses "fullscreen" program uses the following cleanup code:
>     clear();
>     refresh();
>     endwin();
> 
> the termios equivalent to one of those (probably endwin()) doesn't
> seem to get called by bb vi.

What you mean is that curses programs use the terminal init and uninit
(or whatever they're called) capabilities in terminfo, which, for some
terminals, contain escape sequences to switch to and from the
alternate terminal buffer. This makes it possible to avoid clobbering
the contents of the main, scrolling terminal buffer.

Unfortunately, I'm not sure it's simple to do this without
curses/terminfo. That is, I'm not sure if the escapes are
standardized, and whether there's a danger of them having unwanted
effects on terminals that don't support them. Perhaps someone can
research this, and if it's a problem, the behavior could be made
configurable with a "set" option and off by default..

Rich
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to