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

From: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Sat, 30 Mar 2024 12:41:09 +0100

On Sat, Mar 30, 2024 at 01:59:28AM +0100, Storkman wrote:
> 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
>

Thank you, I've reverted the original patch (with some archived notes) for now.

If anyone wants to work on improving the patch, feel free to do so :)

-- 
Kind regards,
Hiltjo
Received on Sat Mar 30 2024 - 12:41:09 CET

This archive was generated by hypermail 2.3.0 : Sat Mar 30 2024 - 12:48:36 CET