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

From: hiro <>
Date: Wed, 29 Mar 2017 11:32:19 +0200

give it up. it's all hopeless. urxvt does it the right way and it still sucks.
for example:

1) run busybox ps in a big terminal, then resize it so stuff would get
cut off in st -> it gets reflowed, which sucks a little cause it
breaks the layout, but at least your stuff is still there, somewhat
readable, and if you want you can just make your window bigger again
2) run busybox ps in a terminal too small: program arguments get cut
off *by ps itself*, increase window width to show the stuff that got
cut off -> there is none (of course)
3) busybox ls -l in a small terminal just outputs longer lines anyway,
which get rewrapped by urxvt, if you resize the window all is fine.

3) is the only good working example, because busybox ls -l ignores
terminal size.

Totally inconsistent crap. Basically you have to stop using stupid
programs that care about terminal width. It's the only real solution.

I'm not even gonna talk about this curses bullshit. I don't care about
integrating such useless programs into scrollback.

On 3/29/17, Ivan Delalande <> wrote:
> On Sun, Mar 26, 2017 at 08:20:39PM +0300, Alexander Krotov wrote:
>> On Sun, Mar 26, 2017 at 06:10:37PM +0200, Laslo Hunhold wrote:
>>> On Sun, 26 Mar 2017 06:41:46 +0300
>>> Alexander Krotov <> wrote:
>>>> Updated patch to clear up to maxcol in some cases and avoid glitches
>>>> when using ncurses programs.
>>> I support this proposition. It may be "troublesome" for programs which
>>> depend on terminal size, but if you think about it, ncurses
>>> applications and the like refresh when the terminal resizes and are not
>>> affected. Countless times I resized the master here and lost a decent
>>> amount of terminal output due to that.
>> The worst thing that can happen is that you reveal some garbage
>> when you increase size of your terminal, because program tried to clear
>> it when it was hidden.
>> I clear it even if it is hidden now with the second version of the
>> patch. For example when character is deleted and all characters after it
>> are shifted, invisible characters are just lost.
>> Glitches that happen when you type a long string at sh prompt and shrink
>> terminal are not worse, they are just different now.
> You are still missing a few `tclearregion(.*, term.col` locations and
> similar in treset(), csihandle(), etc. It should fix a few other
> instances of old content reappearing unexpectedly, but I expect some
> things will remain broken anyway. Hell, even xterm had this for a while
> (from #282 to #289/#290) and ended up reverting it.
> Another approach could be the way urxvt (and other screemuxers) does it:
> rewrap every line when the terminal is resized, but our internal screen
> representation and ATTR_WRAP doesn't make it easy for us.
> And as others, I think all of this should be put in a new command
> outside of st.
> --
> Ivan "Colona" Delalande
Received on Wed Mar 29 2017 - 11:32:19 CEST

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