Re: [dev] [st] [PATCH 2/2] Keep end of lines in memory when resizing terminal

From: Jochen Sprickerhof <>
Date: Wed, 29 Mar 2017 08:34:28 +0200

* Greg Reagle <> [2017-03-27 21:37]:
> > [1]
> As listed above in [1], there is already a scrollback patch. Does it
> have some deficiencies? Is it not a ring buffer?

(Author here) It's a ring buffer.

I wrote it after evaluating the option to implement it in and into
shell, as Anselm suggested, and found it too complex in regards to
adding a vt layer and handling ncurses, as Alexander hinted as well.

Also, preserving the history reliably while you change
shells/users/machines makes it hard as well. And the option to start
something like tmux first is just the same as implementing it in st,
just in a very hackish way, as the result is the same.

I still ponder to write an experimental shell where input and output is
separated and where the last line is input and the rest is scrollable
output. Scrolling through the input history would give you the
corresponding output and all output would be preserved in variables to
ease processing later on (think of piping old output through grep again
and again without having to evaluate the command again).

Anyone knows some code where this is implemented already?

The idea is actually inspired from here:
and the option to use vi as a terminal:

Cheers Jochen

Received on Wed Mar 29 2017 - 08:34:28 CEST

This archive was generated by hypermail 2.3.0 : Wed Mar 29 2017 - 08:36:13 CEST