GNU bug report logs -
#11464
24.1.50; pos-visible-in-window-p returns a false positive with bidi text
Previous Next
Reported by: Ari Roponen <ari.roponen <at> gmail.com>
Date: Sun, 13 May 2012 15:56:01 UTC
Severity: normal
Found in version 24.1.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #52 received at 11464 <at> debbugs.gnu.org (full text, mbox):
> From: Ari Roponen <ari.roponen <at> gmail.com>
> Cc: Michael Welsh Duggan <mwd <at> cert.org>, 11464 <at> debbugs.gnu.org
> Date: Fri, 18 May 2012 11:03:52 +0300
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >
> > It's 270, yes. But the rest is correct: if visible_p is set in this
> > case, it will never be reset with the current code. My original code
> > used
> >
> > if (bottom_y >= it.last_visible_y
> >
> > which would have caught this case.
> >
> > Ari, can you please describe again what happens in this particular
> > case on your machine, step by step, when you step with a debugger
> > through the relevant fragment?
>
> I sent this reply tonight:
> http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-05/msg00476.html
>
> The summary is that the case you are wondering about didn't have the bug
> at all.
Yes, you did say that. But as Michael points out, this fragment
else if (top_y < it.last_visible_y)
visible_p = 1;
should have set visible_p to 1 in your last case, the one where
> bottom_y = 270
> it.last_visible_y = 256
> top_y = 255
> window_top_y = 0
And if that happens, the correction code below, viz.:
if (bottom_y <= it.last_visible_y
&& it.bidi_p && it.bidi_it.scan_dir == -1
&& IT_CHARPOS (it) < charpos)
would evaluate to false, and visible_p would have stayed at its 1
value, which is wrong.
So could you please clarify this case?
Also, what was the value of top_y in your first case, i.e.:
> bottom_y = 300
> it.last_visible_y = 304
Again, sorry for bothering you with the details. I just must
understand what is going on here and where did I err in my original
change.
Thanks!
This bug report was last modified 13 years and 56 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.