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

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

bug#61361: cursor cannot be at the start of overlay that starts with a n


From: Dmitry Gutov
Subject: bug#61361: cursor cannot be at the start of overlay that starts with a newline
Date: Wed, 8 Feb 2023 17:16:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 08/02/2023 17:09, Eli Zaretskii wrote:
From: Xinyang Chen<chenxy@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.






reply via email to

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