[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving point after character when clicking latter half of it

From: Moritz Maxeiner
Subject: Re: Moving point after character when clicking latter half of it
Date: Mon, 10 Jul 2023 22:02:23 +0200

Thank you for your suggestions (I've not quoted them in this reply for 
brevity). Unless I've overlooked something I've implemented them all, except 
for the etc/NEWS entry.

On Monday 10 July 2023 14:46:39 CEST Eli Zaretskii wrote:
> It should also be called out in etc/NEWS.

I agree, but I feel this should be done in the last iteration of the patch, 
once all other changes are done. Which leads me to the next point:

I had to add another piece of code to src/xterm.c, because while text 
selection via mouse dragging did automatically factor in the new optional 
behavior after releasing the mouse, it did not update the highlighted / 
selected region, as that requires mouse-movement events to be triggered, which 
are picked up in mouse.el via mouse-drag-track, which then updated the 
highlighted region. That event, however, is only triggered by leaving the 
previous glyph, so we need to trigger it while still being on the glyph.

I tried sending the event only when crossing the vertical midline of the 
glyph, but for a reason unknown to me, sending the event only once did not 
result in the highlight being updated when dragging the mouse to the right, 
only to the left.

As a workaround, I now trigger the event always while dragging with the 
optional behavior on. If there is a more elegant solution I don't see I'd 
welcome it. For now the overhead doesn't seem noticeable in practice.

Attachment: emacs-29-move_it_in_display_line_to-nextglyphafterhalf-poc-0.4.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]