Re: [hackers] [st] Fix cursor move with wide glyphs || Quentin Rameau

From: Storkman <storkman_AT_storkman.nl>
Date: Sat, 30 Mar 2024 01:59:28 +0100

On Fri, Mar 29, 2024 at 07:27:43PM +0100, Hiltjo Posthuma wrote:
> On Wed, Mar 27, 2024 at 04:11:27PM +0100, Storkman wrote:
> > On Sun, Feb 25, 2024 at 11:57:03AM +0100, git_AT_suckless.org wrote:
> > > commit 7473a8d1a57e5f9aba41b953f4e498c35e1c9dc5
> > > Author: Quentin Rameau <quinq_AT_fifth.space>
> > > AuthorDate: Sun Feb 25 01:31:31 2024 +0100
> > > Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
> > > CommitDate: Sun Feb 25 11:56:43 2024 +0100
> > >
> > > Fix cursor move with wide glyphs
> > >
> > > st would always move back 1 column,
> > > even with wide glyhps (using more than a single column).
> >
> > This is apparently what GNU readline expects, so this change breaks
> > line editing, which worked fine before.
> >
> > --
> > Storkman
> >
>
> Hi,
>
> Can anyone confirm? Preferably with a small example test-case?
>
> Thank you!
>
> --
> Kind regards,
> Hiltjo
>

For a specific example, copy text followed by a wide glyph into bash
or mksh, e.g.
        A字
and press backspace once. Both characters will be erased.

In xterm, "\b" also moves the cursor by one column:

        $ printf "A字\bB\n"
        A B

st after this patch:

        $ printf "A字\bB\n"
        AB

-- 
Storkman
Received on Sat Mar 30 2024 - 01:59:28 CET

This archive was generated by hypermail 2.3.0 : Sat Mar 30 2024 - 02:00:42 CET