On Mon, Mar 27, 2017 at 2:00 PM, Laslo Hunhold <d...@frign.de> wrote:
> On Tue, 28 Mar 2017 00:52:03 +0300
> Alexander Krotov <ilab...@gmail.com> 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.

I'd love to see scrollback also.  I've played around a tiny bit with dumping
everything that goes through st to a file and binding dwm key to run less
on it etc. but never got anything good enough that I use it, largely because
of the issue mentioned above. Admittedly I could have tried harder but my
suspicion is that the best place for scrollback actually is in the terminal
emulator.

Britton

Reply via email to