[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Excessive highlighting of overlay with display property
From: |
Ralf Angeli |
Subject: |
Re: Excessive highlighting of overlay with display property |
Date: |
Tue, 22 Feb 2005 10:35:52 +0100 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) |
* Ralf Angeli (2005-02-19) writes:
> Copying
>
> (let (ov)
> (insert "\n\nxxx")
> (setq ov (make-overlay (line-beginning-position) (point)))
> (overlay-put ov 'mouse-face 'highlight)
> (overlay-put ov 'display "yyy"))
>
> into the *scratch* buffer and typing `C-x C-e' with point at the last
> parenthesis, you will see the string "yyy" further below. If you
> hover with the mouse pointer over it, not only the string will be
> highlighted (which is what I expected) but also the line above the
> string.
>
> (I don't know if this is related, but some time ago I reported a bug
> concerning partial highlighting of a wrapped overlay (see
> <URL:http://article.gmane.org/gmane.emacs.pretest.bugs:4225>).
> According to src/ChangeLog I think it was fixed on 2005-01-18. Maybe
> the fix has something to do with it?)
Okay, I poked around a bit and the following change fixes the problem
for me:
--- xdisp.c 21 Feb 2005 09:01:04 -0000 1.983
+++ xdisp.c 22 Feb 2005 09:19:45 -0000
@@ -20782,7 +20782,7 @@
{
end = prev->glyphs[TEXT_AREA];
glyph = end + prev->used[TEXT_AREA];
- while (--glyph >= end
+ while (--glyph > end
&& INTEGERP (glyph->object));
if (glyph >= end
&& !EQ (stop, glyph->object))
But I am not really sure if this is correct because I did not manage
to get things like the position of point out of the structs involved
in this code while debugging. Also, if I am not mistaken, the
`glyph >= end' test in the if-statement following the change seems to
be always true after the while-loop was executed.
--
Ralf