On Sun, Sep 29, 2002 at 10:50:05PM +0700, Theppitak Karoonboonyanan wrote:
> On Sat, Sep 28, 2002 at 09:49:43AM +0900, Tomohiro KUBOTA wrote:
> > I think this choice is shell's responsibility, not terminal.
> > This is because now "single BACKSPACE" means keyboard typing,
> > not submitting of 0x08 to tty.
> > 
> > Submitting of 0x08 to tty should *always* move cursor left
> > one column, regardless of what character is written on the
> > left column.  This is because terminals cannot tell the
> > context of accepted 0x08.  Many softwares uses 0x08 to
> > move one column left.
> > 
> > For example, even if the left column is doublewidth character,
> > 0x08 moves *one* column and the cursor will be located at the
> > right half of the doublewidth character.  Bash-2.05b is aware
> > of this behavior and, when BACKSPACE key is pressed after
> > doublewidth character, bash issues 0x08 0x08 0x20 0x20 0x08 0x08 
> > to the tty to erase the whole doublewidth character.  (It is
> > more complex in real, to handle line folding.)
> 
> Seems so clear to me now. Thanks for the explanation. So, let's
> move to bash (and whatever other shells). :)
> 
> And the discussion should be moved to li18nux instead of xfree86-i18n.
> So, I'll stop following up this thread in xfree86-i18n after this one.

Umm.. After digging some codes, I've changed my mind.

Is it still possible for bash to tell xterm to remove just the last
combining character of previous cell, while the cursor stands still?

In that case, CursorBack() in cursor.c needs to retrieve screen buffer
(using SCRN_BUF_COM1L() and so on) to determine whether to move back.

This may look awkward for the definition of 0x08 to move back
inconsistently. But the situation can still be defined more gracefully
if we allow the cursor to stop at each combining character, and moving
left through a combined cell means moving through the combining
characters one by one to the base character before advancing to previous
cell. This implementation has been adopted by some locally-patched
terminal emulator, such as xiterm+thai (available in debian sid).

Is it possible for xterm?

-Thep.
-- 
Theppitak Karoonboonyanan
Thai Linux Working Group (TLWG)
http://linux.thai.net/thep/
_______________________________________________
I18n mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/i18n

Reply via email to