|
From: | Platon Pronko |
Subject: | Re: Moving point around empty overlays with 'after-text |
Date: | Mon, 10 Apr 2023 13:48:55 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 |
On 2023-04-10 13:35, tomas@tuxteam.de wrote:
For non-zero width overlays, it is quite easy to have point to each side of the overlay's "border": it depends on which side you are coming from. For me, at least, it is intuitive.
Does it work that way for you? For me the default non-propertized overlay always shows the cursor at the end, regardless of which direction I arrived from. Here's the test file I used: ``` ABEF (defun test-overlay-cursor (completion pt) (remove-overlays) (save-excursion (let* ((p-completion (propertize completion 'face 'error)) (ov (make-overlay pt pt nil t t))) (overlay-put ov 'display "") (overlay-put ov 'after-string p-completion))) (goto-char 0)) (test-overlay-cursor "CD" 3) ``` I can navigate so I see "AB{CD}<cursor>EF" or "A<cusor>B{CD}EF", but I can't get the cursor to be before the overlay: "AB<cursor>{CD}EF". Of course one can add properties to the overlay to get the cursor be positioned always in front, but then you can't get to show it at end. The main point of the discussion is that it would be nice if it would be possible use usual navigation commands to get from "AB<cusror>{CD}EF" to "AB{CD}<cusor>EF". -- Best regards, Platon Pronko PGP 2A62D77A7A2CB94E
[Prev in Thread] | Current Thread | [Next in Thread] |