GNU bug report logs -
#61361
cursor cannot be at the start of overlay that starts with a newline
Previous Next
Reported by: Xinyang Chen <chenxy <at> mit.edu>
Date: Wed, 8 Feb 2023 07:44:02 UTC
Severity: normal
Tags: wontfix
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 08/02/2023 17:09, Eli Zaretskii wrote:
>> From: Xinyang Chen<chenxy <at> mit.edu>
>> Date: Wed, 8 Feb 2023 09:25:07 -0500
>>
>> I'm not seeing the point here though; what happens if you have a line with a single newline? What allows
>> placing a cursor there in that case?
> In that case, Emacs_knows_ that point is positioned at the newline,
> so it does an extra-special trick of placing the cursor after the last
> character of the line.
>
> But the 'cursor' property just supplies the index in the display
> string where your Lisp program wants to place the cursor. Emacs
> cannot place point inside a display string. So the display engine
> needs to find where that index is on display. And it cannot find that
> place because there's no glyph that corresponds to the newline.
So, no chance of the display engine detecting that the same display
string with the 'cursor' property has a newline at that position?
That's unfortunate: that means we'll need to create some wonky
workaround for displaying a completion preview (in Company) when a
completion starts with a newline.
This bug report was last modified 1 year and 261 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.