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#22637: 25.1.50; `mode-line` face `:height` incompatible with `scroll-conservatively 101`. Date: Sun, 14 Feb 2016 08:05:58 +0200 Message-ID: <83io1rzv09.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1455430042 470 80.91.229.3 (14 Feb 2016 06:07:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Feb 2016 06:07:22 +0000 (UTC) Cc: 22637@debbugs.gnu.org To: Keith David Bershatsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 14 07:07:11 2016 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 1aUppu-0006FZ-6c for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Feb 2016 07:07:10 +0100 Original-Received: from localhost ([::1]:47847 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUppt-0004o5-E2 for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Feb 2016 01:07:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUppp-0004nu-M9 for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 01:07:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUppm-0001Ex-BO for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 01:07:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUppm-0001Et-7s for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 01:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aUppm-0000sU-49 for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 01:07:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Feb 2016 06:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22637 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22637-submit@debbugs.gnu.org id=B22637.14554299673287 (code B ref 22637); Sun, 14 Feb 2016 06:07:02 +0000 Original-Received: (at 22637) by debbugs.gnu.org; 14 Feb 2016 06:06:07 +0000 Original-Received: from localhost ([127.0.0.1]:38472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aUpos-0000qx-QG for submit@debbugs.gnu.org; Sun, 14 Feb 2016 01:06:06 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59310) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aUpoq-0000qU-U6 for 22637@debbugs.gnu.org; Sun, 14 Feb 2016 01:06:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUpoi-0000ur-Gp for 22637@debbugs.gnu.org; Sun, 14 Feb 2016 01:05:59 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUpoi-0000un-ED; Sun, 14 Feb 2016 01:05:56 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2443 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aUpoh-0001PD-Cr; Sun, 14 Feb 2016 01:05:56 -0500 In-reply-to: (message from Keith David Bershatsky on Sat, 13 Feb 2016 19:40:34 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:113005 Archived-At: > Date: Sat, 13 Feb 2016 19:40:34 -0800 > From: Keith David Bershatsky > Cc: 22637@debbugs.gnu.org > > In addition to the fix that you implemented yesterday near the section of "optimization 3", another similar fix would be needed near the following "recenter" section that affects cursor visibility when using isearch where sometimes point is below the bottom of the screen and remains there subsequent to redisplay. I have not yet been able to figure out how to use `cursor_row_fully_visible_p`, so I used something a little easier for me to understand that basically tests the same thing (I think). > > If I can come up with a small test that demonstrates the problem when searching, I'll send over an example. The following code, however, does seem to fix the problem in all of my tests. Please do come up with a test case. I don't want to make any change that doesn't have a test which fails before and succeeds after the change. Having such test cases allows us to make sure later changes don't reintroduce the same bug. > /* Added a check/fix for a problem similar/same as bug #22637. */ > if (1 == try_window (window, it.current.pos, TRY_WINDOW_CHECK_MARGINS)) > { > bool fully_p = false; > EMACS_INT posint = PT; > struct buffer *buf; > int x, y, rtop, rbot, rowh, vpos; > buf = XBUFFER (w->contents); > if ((posint >= CHARPOS (startp) && posint <= BUF_ZV (buf)) > && CHARPOS (startp) >= BUF_BEGV (buf) > && CHARPOS (startp) <= BUF_ZV (buf) > && pos_visible_p (w, posint, &x, &y, &rtop, &rbot, &rowh, &vpos)) > fully_p = !rtop && !rbot; > if (!fully_p) > { > #ifdef GLYPH_DEBUG > debug_method_add (w, "!fully_p -- goto try_to_scroll"); > #endif > goto try_to_scroll; > } > else > { > #ifdef GLYPH_DEBUG > debug_method_add (w, "fully_p -- goto done"); > #endif > goto done; > } I don't think this is correct. try_window is called in many more places in the display engine, so if this problem is due to what it does, the fix should be inside try_window, not in its callers. But I could be wrong -- I need to see the problem to be sure. Thanks.