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

From: Laslo Hunhold <>
Date: Tue, 28 Mar 2017 00:00:05 +0200

On Tue, 28 Mar 2017 00:52:03 +0300
Alexander Krotov <> wrote:

Hey Alexander,

> As Laslo Hunhold suggests down the thread, this solution is likely to
> be more complex.
> To implement it properly, you have to implement a whole VT inside
> of stsb, because it has to pass mouse events down and keep track
> of character attributes. ncurses programs will output all kinds
> of "move cursor here" and "change color" control sequences, but you
> can't just pass them again to st when you need to scroll around. You
> have to take your virtual state of the screen and render it in your
> own way, adapting it to current viewport. Well, you can delegate
> rendering to ncurses, but state machine which tracks screen state
> will just replicate terminal emulator functions.
> In the end, you will have a stripped down dvtm, with vt but without
> multiplexing.

this is a very good point! Even if this was approached with an external
tool you probably just start implementing st again with all the bells
and whistles, let alone the fact that you need a separate program to
make st work as desired in a normal setup within a window manager.

> After that, I can proceed with implementation of scrollback based
> on ring buffer. If it makes code simpler (by removing line shuffling,
> allocation and deallocation in tresize), it may be integrated into
> st. If not, it will be just another patch.

A scrollback based on a ring buffer sounds exciting; I'm really looking
forward to see how much it adds in the end. After all, the wiki might
still be an option, but I would really propose to integrate it if it
turns out not to be too complex.

With best regards


Laslo Hunhold <>
Received on Tue Mar 28 2017 - 00:00:05 CEST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 00:01:09 CEST