From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#22637: 25.1.50; `mode-line` face `:height` incompatible with `scroll-conservatively 101`. Date: Sat, 13 Feb 2016 19:40:34 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1455421282 15440 80.91.229.3 (14 Feb 2016 03:41:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Feb 2016 03:41:22 +0000 (UTC) Cc: 22637@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 14 04:41:10 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 1aUnYb-0008Ob-Ux for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Feb 2016 04:41:10 +0100 Original-Received: from localhost ([::1]:47011 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUnYb-0005Je-2E for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Feb 2016 22:41:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUnYY-0005JY-0y for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2016 22:41:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUnYU-0005q3-Qz for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2016 22:41:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47662) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUnYU-0005pz-NX for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2016 22:41:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aUnYU-0005to-Bf for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2016 22:41:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Feb 2016 03:41: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.145542124522646 (code B ref 22637); Sun, 14 Feb 2016 03:41:02 +0000 Original-Received: (at 22637) by debbugs.gnu.org; 14 Feb 2016 03:40:45 +0000 Original-Received: from localhost ([127.0.0.1]:38437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aUnYC-0005tC-W2 for submit@debbugs.gnu.org; Sat, 13 Feb 2016 22:40:45 -0500 Original-Received: from cobb.liquidweb.com ([50.28.13.150]:46326) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aUnYA-0005sx-O8 for 22637@debbugs.gnu.org; Sat, 13 Feb 2016 22:40:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date; bh=IKx1KG8ZhB97iqEQTQs6QscQMI8kP6AXDPTi55abetk=; b=cRqiwbwsjoZrOB6Ud/1eIX0n08dKmwH2mNY+mWSE6Xseu774USFYso1oJQxPyeBUOi+JBsrcV8HZ0cGmjrREisaH+UorpFJyQZyOBWdJCeiIjhQMKZ92+HhtL7yOHeID; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:56122 helo=server.private.localhost) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from ) id 1aUnY0-0000K5-61; Sat, 13 Feb 2016 22:40:32 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry: lawlist|lawlist.com 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:113002 Archived-At: 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. /* Users who set scroll-conservatively to a large number want point just above/below the scroll margin. If we ended up with point's row partially visible, move the window start to make that row fully visible and out of the margin. */ if (scroll_conservatively > SCROLL_LIMIT) { int window_total_lines = WINDOW_TOTAL_LINES (w) * FRAME_LINE_HEIGHT (f) * frame_line_height; int margin = scroll_margin > 0 ? min (scroll_margin, window_total_lines / 4) : 0; bool move_down = w->cursor.vpos >= window_total_lines / 2; move_it_by_lines (&it, move_down ? margin + 1 : -(margin + 1)); clear_glyph_matrix (w->desired_matrix); /* 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; } } }