From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: chenxy@mit.edu, 61361@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 [thread overview]
Message-ID: <83ilgcnqct.fsf@gnu.org> (raw)
In-Reply-To: <20e98dc0-c939-7bd8-e922-aba4470a2567@yandex.ru> (message from Dmitry Gutov on Wed, 8 Feb 2023 16:41:28 +0200)
> Date: Wed, 8 Feb 2023 16:41:28 +0200
> Cc: 61361@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
>
> Hi Eli,
>
> On 08/02/2023 15:08, Eli Zaretskii wrote:
> > tags 61361 wontfix
> > thanks
> >
> >> From: Xinyang Chen<chenxy@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.
next prev parent reply other threads:[~2023-02-08 15:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 4:29 bug#61361: cursor cannot be at the start of overlay that starts with a newline Xinyang Chen
2023-02-08 13:08 ` Eli Zaretskii
2023-02-08 14:41 ` Dmitry Gutov
2023-02-08 15:12 ` Eli Zaretskii [this message]
[not found] ` <CAKGiUYy8m+nD6Z7wmOpPmGCvvVzuixcdhQathCK8hr4KAFpcCw@mail.gmail.com>
2023-02-08 15:09 ` Eli Zaretskii
2023-02-08 15:16 ` Dmitry Gutov
2023-02-08 15:50 ` Eli Zaretskii
2023-02-08 22:06 ` Dmitry Gutov
2023-09-04 21:08 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83ilgcnqct.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=61361@debbugs.gnu.org \
--cc=chenxy@mit.edu \
--cc=dgutov@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).