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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 08 Feb 2023 17:09:22 +0200

> From: Xinyang Chen <[email-masked]>
> 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.