On Sun, Sep 27, 2009 at 08:40:41PM +0200, Zsbán Ambrus <[email protected]> 
wrote:
> erased with backspace-space-backspace combination.  This is exactly
> what the terminal layer (stty or tcsetattr) does (on Linux at least,
> but likely on other systems as well) if you erase a character with the

This is just one of the many bugs in the terminal layer that are hard to fix
because the kernel has not enough information about the terminal (encoding,
cursor movement etc.).

It cannot really be fixed in urxvt - urxvt's behaviour is correct (it's a
vt100 emulator, and vt100 does keep the cursor in the last column, and on
a cursor-left command sequence moves it left).

> Now I'm not quite sure if this is a bug in urxvt or something else and
> how it should be fixed, but here are my thoughts.

It can only be fixed in the kernel by teaching it about terminal
characteristics - the kernel has no access to terminfo, locale data etc.,
and the behaviour of most kernels is just a "try as best as you can" -
don't expect correctness from these hacks, as understandable as they might
be.

> Firstly, the terminal layer of Linux is very ancient and is stable and

Also very buggy, yes.

> rarely changed, much more so than urxvt;

If you know more about instability issues with urxvt, you should report
them.  Until then, this is just unfounded claims.

> and even if it's buggy it would be very hard to change it on every
> machine (including those where urxvt is not installed).

I don't think this is a problem, or that there is even a need to.

> erasing, sorry.)  Secondly, the terminal layer should work with as
> many strange terminal as possible, and you don't get much more

vt100 emulators are hardly "strange".

> portable than backspace-space-backspace

Well, it fails with wide characters, for example, and basically all vt100
emulators, which is the most common terminal type. Not sure how "portable"
that is, but it only works with single lines and ascii only.

> On the other hand, I'm not sure how this behavior can be fixed without
> breaking everything else.

Telling the kernel about the terminal characteristics is the only way to fix
it.

However, I am not sure there is any demand for it - if you rely on the
terminal line descipline's editing capabilities, you are probbaly doing
something wrong.

I think it's a definite non-problem.

> urxvt.)  As far as I know, programs don't know that backspace can jump
> to the previous line,
   
Well, it's specified by international standards, which most terminals
follow, so I guess if they don't know, it is their problem alone.

> but they might as well know (or assume) what happens if they backspace
> from an about-to-wrap position.

Which is much harder to know (you need the current size).

> serious screen update bugs in bash 4.0 which affect both urxvt and
> other terminals, the terminal library in the joe editor historically
> not handling the last screen column of the terminal well, and how
> these two are the terminal applications I use the most, I probably
> won't be too useful even in testing a patch.)

If the apps are broken, you should make a fix for them, instead of trying
to hack around their bugs in the temrinal emulator and in turn making the
life for correct applications even harder.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode

Reply via email to