Monday, June 06, 2011

[emgrhbkn] Overwrite from top instead of scroll

Scrolling text in a terminal window strikes me as a silly computationally expensive operation.  Every pixel needs to be rewritten for each new line.  Memcpy and memmap tricks might speed things up, but compositing window managers make things hard again.  Large, especially tall, displays stress the graphics subsystem.

Design a terminal such that if the cursor is at the bottom of the screen, the next line causes the cursor to jump to the top and start overwriting lines from the top.  Thus, the last N lines remain visible, just like in a scrolling terminal, though there is a bottom-to-top wrap.

I suspect this is all old school.

The line after the cursor always gets colored as a thick horizontal bar of a special color, so we know where the cursor and most recent text is.  An explict "rebottom" request (similar in idea to ^L) redisplays the screen contents with the cursor at the bottom.

No comments :