Re: [dev] [st] [PATCH] Correct shift amount on MODE_INSERT in tputc()

From: FRIGN <>
Date: Fri, 30 Jan 2015 20:14:59 +0100

On Fri, 30 Jan 2015 09:53:41 -0800
Rian Hunter <> wrote:

> Thanks for the feedback everyone. Glad to contribute, st is literally the only
> sane freely available graphical terminal emulator in existence.

> The original code still looks a bit fishy to me. It looks like there could be
> a situation where two newlines are written when a single character is inserted
> (e.g. when term.col < width). From reading the code, terminal emulation seems
> complex and it was hard to infer the correct behavior without knowing
> every use case in which the various combinations of MODE_INSERT/MODE_WRAP
> apply. My best theory is that MODE_WRAP is redundant though that seems wrong.

Yes, it takes a while to work out how st works in all details. The main issue now
is the debate wether to use Fontconfig or Xft in the renderer.

> I'd really appreciate it if there were a longer comment detailing how
> word wrap, auto newline insertion, and overflow handling are supposed to be
> handled in st.

Hehe, a few comments here and there would definitely be helpful. But much more
important is writing code in a way that it speaks for itself.
In cases it is not, comments should be added.



Received on Fri Jan 30 2015 - 20:14:59 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 30 2015 - 20:24:07 CET