From: Lars Ingebrigtsen <larsi@gnus.org>
To: ynyaaa@gmail.com
Cc: 39245@debbugs.gnu.org
Subject: bug#39245: 26.3; 'mouse-face highlighting is extended beyond EOB
Date: Wed, 28 Oct 2020 13:36:09 +0100 [thread overview]
Message-ID: <87wnzar0hy.fsf@gnus.org> (raw)
In-Reply-To: <86wo9jc4h9.fsf@gmail.com> (ynyaaa@gmail.com's message of "Thu, 23 Jan 2020 11:05:06 +0900")
ynyaaa@gmail.com writes:
> If a buffer does not end with a newline and 'mouse-face property is
> added at the last character, 'mouse-face highlighting covers the blank
> area to the right of the last character.
>
> If 'mouse-face region contains newline characters,
> the blank area to the right of the last character is not highlighted.
>
> Example: Evaluate the form below and move the mouse pointer onto 'XYZ'.
> Then the blank area to the right of 'Z' is highlighted.
> If a newline character is inserted between 'X' and 'Y',
> the blank area to the right of 'Z' is not highlighted.
>
> (let ((buf (generate-new-buffer "tmp")))
> (switch-to-buffer buf)
> (insert (propertize "XYZ" 'mouse-face 'region)))
This behaviour is still present in Emacs 28.
But I'm not sure what the correct behaviour would be. Since mouse-face
has :extend, would it make sense to also extend it at eob? Possibly...
not?
In any case, the current behaviour is a bug -- if it should extend at
eob, it should continue to do so even if the area has a newline, I
think. (Or not extend at eob at all.)
This is just an issue with mouse-face, face doesn't have this problem:
(let ((buf (generate-new-buffer "tmp")))
(switch-to-buffer buf)
(insert (propertize "XYZ" 'face 'region)))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2020-10-28 12:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 2:05 bug#39245: 26.3; 'mouse-face highlighting is extended beyond EOB ynyaaa
2020-10-28 12:36 ` Lars Ingebrigtsen [this message]
2020-10-28 15:41 ` Eli Zaretskii
2020-10-30 11:37 ` Lars Ingebrigtsen
2020-10-30 11:44 ` Eli Zaretskii
2020-10-30 11:50 ` Eli Zaretskii
2020-11-01 11:40 ` Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wnzar0hy.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=39245@debbugs.gnu.org \
--cc=ynyaaa@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.