Subject: Re: bug#78474: 31.0.50; Wrong char insertion in rxvt

From: Eli Zaretskii <[email-masked]>
Date: Thu, 17 Jul 2025 08:30:44 +0300

> From: Robert Pluim <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked],
>   [email-masked]
> Date: Wed, 16 Jul 2025 17:43:49 +0200
> 
> >>>>> On Fri, 11 Jul 2025 22:06:25 +0300, Eli Zaretskii <[email-masked]> said:
> 
>     >> From: Robert Pluim <[email-masked]>
>     >> Cc: Samuel Thibault <[email-masked]>,  [email-masked],  Eli
>     >> Zaretskii <[email-masked]>,  [email-masked]
>     >> Date: Fri, 11 Jul 2025 19:32:43 +0200
>     >> 
>     >> >>>>> On Fri, 11 Jul 2025 17:20:52 +0200, Bastien Guerry <[email-masked]> said:
>     >> 
>     Bastien> Is there anyone working on this?
>     Bastien> It's beyond my skills, but I'd hate to see this bug closed due to lack
>     Bastien> of activity/interest.  Let me know if I can help somehow.
>     >> 
>     >> I can take a look at it. Eli, a clue as to where this optimization
>     >> happens in the redisplay code?
> 
>     Eli> I mentioned that up-thread: it's in cm.c.
> 
> Thanks, Iʼd missed that.
> 
> cm.c works out the cost of either
> 
> - moving past the destination with tabs then moving left
> - moving towards the destination with tabs then moving right
> - moving right directly to the destination
> 
> According to my instrumentation, emitting the 'move right' command
> costs 3 times as much as 'emit tab' or 'move left' here, so itʼs an
> optimization that makes sense, especially if the destination is far
> away.
> 
> So I donʼt think a generic 'make tabs expensive' is a good idea, but I
> guess we could add a user option to disable the use of tabs for motion
> on ttys.

Feel free to suggest a patch with such a variable.

We should also think how to make the accessibility-related knobs more
discoverable.  Perhaps a new section in the user manual is in order.

Thanks.