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: Fri, 18 May 2012 10:42:35 +0300 Message-ID: <83ehqindec.fsf@gnu.org> References: <87y5owjcto.fsf@gmail.com> <83pqa8vsxw.fsf@gnu.org> <87fwb1dagj.fsf_-_@gmail.com> <83wr4do1qv.fsf@gnu.org> <87bolor98t.fsf@gmail.com> <83sjf0nolt.fsf@gnu.org> <87pqa3csuc.fsf@gmail.com> <83likqojxl.fsf@gnu.org> <83fwayo6mz.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1337326920 23165 80.91.229.3 (18 May 2012 07:42:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 May 2012 07:42:00 +0000 (UTC) Cc: ari.roponen@gmail.com, 11464@debbugs.gnu.org To: Michael Welsh Duggan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 18 09:41:58 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 1SVHox-0005pT-MX for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 May 2012 09:41:56 +0200 Original-Received: from localhost ([::1]:36148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVHox-0006Xu-44 for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 May 2012 03:41:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVHop-0006Xk-Ek for bug-gnu-emacs@gnu.org; Fri, 18 May 2012 03:41:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SVHok-0002IG-JN for bug-gnu-emacs@gnu.org; Fri, 18 May 2012 03:41:47 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVHok-0002IC-Fl for bug-gnu-emacs@gnu.org; Fri, 18 May 2012 03:41:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SVHp3-0000MG-Io for bug-gnu-emacs@gnu.org; Fri, 18 May 2012 03:42: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: Fri, 18 May 2012 07:42: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.13373268921340 (code B ref 11464); Fri, 18 May 2012 07:42:01 +0000 Original-Received: (at 11464) by debbugs.gnu.org; 18 May 2012 07:41:32 +0000 Original-Received: from localhost ([127.0.0.1]:60087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVHoZ-0000LZ-Kl for submit@debbugs.gnu.org; Fri, 18 May 2012 03:41:32 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:47505) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVHoF-0000L2-Bk for 11464@debbugs.gnu.org; Fri, 18 May 2012 03:41:30 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0M4700E00JXIUO00@a-mtaout23.012.net.il> for 11464@debbugs.gnu.org; Fri, 18 May 2012 10:40:15 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M4700EEKJZ2MG60@a-mtaout23.012.net.il>; Fri, 18 May 2012 10:40:15 +0300 (IDT) In-reply-to: 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:60168 Archived-At: > From: Michael Welsh Duggan > Cc: ari.roponen@gmail.com, 11464@debbugs.gnu.org > Date: Thu, 17 May 2012 17:22:36 -0400 > > Eli Zaretskii writes: > > >> From: Michael Welsh Duggan > >> Cc: Ari Roponen , 11464@debbugs.gnu.org > >> Date: Thu, 17 May 2012 13:56:45 -0400 > >> > >> else if (top_y < it.last_visible_y) ==> if (255 < 256) ==> if (TRUE) > >> > >> hence, visible_p _would_ be set to 1 by the else if clause. > > > > And will never be reset to zero, because 27 <= 256 => FALSE. And yet > > Ari said that he needed to change the condition to <=. > > But where do you get 27? The number was 270, I believe. 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'm sorry I keep asking questions, but I must understand what was incorrect in my original reasoning, to make sure there's no subtle bugs lurking here. Also, for this case: > bottom_y = 300 > it.last_visible_y = 304 can you show the corresponding values of top_y and window_top_y? Thanks.