unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Linus Källberg" <linus.kallberg@outlook.com>
Cc: "36550@debbugs.gnu.org" <36550@debbugs.gnu.org>
Subject: bug#36550: mouse-face overlay calculation error
Date: Sat, 13 Jul 2019 02:31:15 +0200	[thread overview]
Message-ID: <m3v9w6rd0s.fsf_-_@gnus.org> (raw)
In-Reply-To: <AM0PR09MB2867803F96B1A7F4A5B4C81687F30@AM0PR09MB2867.eurprd09.prod.outlook.com> ("Linus \=\?utf-8\?Q\?K\=C3\=A4llberg\=22's\?\= message of "Thu, 11 Jul 2019 16:34:29 +0000")

Linus Källberg <linus.kallberg@outlook.com> writes:

> On second thought, I don't think the real problem is in recentf.el, but 
> rather in the implementation of widgets and/or faces. It makes sense to 
> keep recentf.el as it is.

There's something even more fundamentally wrong going on here, I think.

Here's a test case:

(progn
  (let ((point (point)))
    (insert "foo\n")
    (let ((o (make-overlay point (point))))
      (overlay-put o 'mouse-face 'highlight)
      (insert "bar"))))

This should make a mouse face that's displayed the entire "foo" line,
but it extends to the first character of the next line.

If you make it one character shorter, then the entire line isn't
highlighted.

And!  If you say `face' instead of `mouse-face', then everything is
highlighted correctly (i.e., just the entire "foo" line, and not the "b"
on the next line).

So is there some basic fault in the code that calculates the length of
the mouse highlighting?  I don't really know where to start looking...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  parent reply	other threads:[~2019-07-13  0:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 12:54 bug#36550: Small bug fix in recentf.el Linus Källberg
2019-07-08 19:58 ` Lars Ingebrigtsen
     [not found]   ` <AM0PR09MB2867529A5BCE4551365F142C87F60@AM0PR09MB2867.eurprd09.prod.outlook.com>
2019-07-09 13:04     ` Lars Ingebrigtsen
2019-07-11 16:34       ` Linus Källberg
2019-07-12 15:07         ` Lars Ingebrigtsen
2019-07-13  0:31         ` Lars Ingebrigtsen [this message]
2019-07-13  6:15           ` bug#36550: mouse-face overlay calculation error Eli Zaretskii
2019-07-13 13:10             ` Lars Ingebrigtsen
2019-07-13 13:23               ` Eli Zaretskii
2019-07-13 13:50                 ` Lars Ingebrigtsen
2019-07-13 14:17                   ` Eli Zaretskii
2019-07-13 14:25                     ` Lars Ingebrigtsen
2019-07-13 14:50                       ` Eli Zaretskii
2019-07-13 15:05                         ` Lars Ingebrigtsen
2019-07-13 15:08                           ` Lars Ingebrigtsen
2019-07-13 15:38                             ` Linus Källberg
2019-07-13 15:49                               ` Eli Zaretskii
2019-07-13 19:49                                 ` Linus Källberg
2019-07-14  5:30                                   ` Eli Zaretskii

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=m3v9w6rd0s.fsf_-_@gnus.org \
    --to=larsi@gnus.org \
    --cc=36550@debbugs.gnu.org \
    --cc=linus.kallberg@outlook.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 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).