GNU bug report logs - #22637
25.1.50; `mode-line` face `:height` incompatible with `scroll-conservatively 101`.

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Fri, 12 Feb 2016 02:14:02 UTC

Severity: normal

Tags: moreinfo

Found in version 25.1.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 22637 <at> debbugs.gnu.org (full text, mbox):

From: Keith David Bershatsky <esq <at> lawlist.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 22637 <at> debbugs.gnu.org
Subject: Re: bug#22637: 25.1.50;
 `mode-line` face `:height` incompatible with `scroll-conservatively
 101`.
Date: Sat, 13 Feb 2016 19:40:34 -0800
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;
          }
    }

	}




This bug report was last modified 3 years and 164 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.