GNU bug report logs - #61361
cursor cannot be at the start of overlay that starts with a newline

Previous Next

Package: emacs;

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: chenxy <at> mit.edu, 61361 <at> debbugs.gnu.org
Subject: bug#61361: cursor cannot be at the start of overlay that starts with a newline
Date: Wed, 08 Feb 2023 17:12:18 +0200
> Date: Wed, 8 Feb 2023 16:41:28 +0200
> Cc: 61361 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> 
> Hi Eli,
> 
> On 08/02/2023 15:08, Eli Zaretskii wrote:
> > tags 61361 wontfix
> > thanks
> > 
> >> From: Xinyang Chen<chenxy <at> mit.edu>
> >> Date: Tue, 7 Feb 2023 23:29:31 -0500
> >>
> >> steps to reproduce:
> >> ;; test line
> >> (if (and (boundp 'overlay) (overlayp overlay)) (delete-overlay overlay))
> >> (setq overlay (make-overlay 1 2))
> >> (overlay-put overlay 'display "\nhello")
> >> ;; same result if you do this intead
> >> ;; (overlay-put overlay 'display (propertize "\nhello" 'cursor 0))
> >>
> >> cursor does not display in the first line.
> > Emacs cannot do what you are asking because the newline leaves no
> > glyph on display.  So the display engine cannot place the cursor on
> > the newline as it does on other characters, which do have glyphs.
> > 
> > This is a limitation of the 'cursor' property feature.  Sorry.
> 
> Could you explain that a little further?
> 
> When I have a line with text and move point to the end of it, the cursor 
> is rendered, right? Does that use some other method than "glyphs", 
> making it unavailable to the handling of 'cursor' in a display spec?

Yes, it does use a different method, because in that case the cursor
is displayed at point's position, not at some arbitrary index of a
string.

I just tried to explain the difference, in a previous message.  If
something is still unclear, please ask more specific questions.




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.