help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Moving point around empty overlays with 'after-text


From: Platon Pronko
Subject: Re: Moving point around empty overlays with 'after-text
Date: Mon, 10 Apr 2023 13:22:45 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1

On 2023-04-10 12:56, Eli Zaretskii wrote:
Date: Mon, 10 Apr 2023 09:52:54 +0800
From: Platon Pronko <platon7pronko@gmail.com>

Anyway, even if you make this overlay to cover something it won't solve the 
problem - it still won't be possible to navigate the cursor to be before or 
after the hint.

I don't understand from this discussion why would you want to move the
cursor to be before or after the hint.  I also don't understand why,
if you do need to move the cursor, adding or removing the 'cursor'
property to the overlay string would not solve that.

More generally, what is the requested functionality here and/or the
problem you are trying to solve?  Can you explain that clearly in
terms of user-facing features and behaviors?


I'll try to do it with bunch of attached images, since it feels that it will be 
easier to explain. If it's better to use text examples, please tell me, I'll 
try to reformat them.

The base example is in inlay-base.png image - you can see the inline hint on the second 
line ("a1 =").

I can position the cursor right before the inline hint (inlay-cursor-before.png), type 
"41, ", thus adding a new argument before existing one 
(inlay-cursor-before-result.png).

But I can also position the cursor right after the inline hint (inlay-cursor-after.png), 
type "12", which will be prepended before the old argument value 
(inlay-cursor-after-result.png).

The difference is of course only visual, the characters are still insterted 
into the buffer in the same spot - but if we don't allow the user to select the 
side of the inlay it would look confusing half the time.

Attachment: inlay-base.png
Description: PNG image

Attachment: inlay-cursor-before.png
Description: PNG image

Attachment: inlay-cursor-before-result.png
Description: PNG image

Attachment: inlay-cursor-after.png
Description: PNG image

Attachment: inlay-cursor-after-result.png
Description: PNG image


reply via email to

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