From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#11464: 24.1.50; pos-visible-in-window-p returns a false positive with bidi text Date: Tue, 15 May 2012 19:19:52 +0300 Message-ID: <83wr4do1qv.fsf@gnu.org> References: <87y5owjcto.fsf@gmail.com> <83pqa8vsxw.fsf@gnu.org> <87fwb1dagj.fsf_-_@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1337098760 30775 80.91.229.3 (15 May 2012 16:19:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 May 2012 16:19:20 +0000 (UTC) Cc: 11464@debbugs.gnu.org To: Ari Roponen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 15 18:19:17 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SUKSs-00022d-Se for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 May 2012 18:19:11 +0200 Original-Received: from localhost ([::1]:40136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUKSs-0007Oe-0p for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 May 2012 12:19:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUKSm-0007Kp-4s for bug-gnu-emacs@gnu.org; Tue, 15 May 2012 12:19:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUKSf-0005H5-O9 for bug-gnu-emacs@gnu.org; Tue, 15 May 2012 12:19:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUKSf-0005Gw-K2 for bug-gnu-emacs@gnu.org; Tue, 15 May 2012 12:18:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SUKSj-00077N-T8 for bug-gnu-emacs@gnu.org; Tue, 15 May 2012 12:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 May 2012 16:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11464 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11464-submit@debbugs.gnu.org id=B11464.133709872127333 (code B ref 11464); Tue, 15 May 2012 16:19:01 +0000 Original-Received: (at 11464) by debbugs.gnu.org; 15 May 2012 16:18:41 +0000 Original-Received: from localhost ([127.0.0.1]:56295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUKSO-00076o-Ub for submit@debbugs.gnu.org; Tue, 15 May 2012 12:18:41 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:39431) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUKSM-00076Z-MO for 11464@debbugs.gnu.org; Tue, 15 May 2012 12:18:39 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M4200J00NR96J00@a-mtaout22.012.net.il> for 11464@debbugs.gnu.org; Tue, 15 May 2012 19:17:40 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M4200I8VNXF13I0@a-mtaout22.012.net.il>; Tue, 15 May 2012 19:17:40 +0300 (IDT) In-reply-to: <87fwb1dagj.fsf_-_@gmail.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60036 Archived-At: > From: Ari Roponen > Cc: 11464@debbugs.gnu.org > Date: Tue, 15 May 2012 13:07:08 +0300 > > Eli Zaretskii writes: > > > > > But since the fix is quite simple, here you go: fixed in revision > > 107994 on the emacs-24 branch. > > > > Thank you. I can still reproduce the bug with that revision, but the > following tweak seems to help. I'm not sure if it is correct, but at > least it fixes the testcase, and everything else seems to work okay. > > === modified file 'src/xdisp.c' > --- src/xdisp.c 2012-05-13 18:22:35 +0000 > +++ src/xdisp.c 2012-05-15 09:51:45 +0000 > @@ -1313,7 +1313,7 @@ > visible_p = bottom_y > window_top_y; > else if (top_y < it.last_visible_y) > visible_p = 1; > - if (bottom_y >= it.last_visible_y > + if (bottom_y <= it.last_visible_y > && it.bidi_p && it.bidi_it.scan_dir == -1 > && IT_CHARPOS (it) < charpos) > { Interesting. What are the values of bottom_y and it.last_visible_y that you see? I only see strict equality in that condition, so both variants work for me. Anyway, I installed the change you suggested, thanks.