unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Keith David Bershatsky <esq@lawlist.com>
Cc: 22637@debbugs.gnu.org
Subject: bug#22637: 25.1.50; `mode-line` face `:height` incompatible with `scroll-conservatively 101`.
Date: Sun, 14 Feb 2016 08:05:58 +0200	[thread overview]
Message-ID: <83io1rzv09.fsf@gnu.org> (raw)
In-Reply-To: <m2fuww558t.wl%esq@lawlist.com> (message from Keith David Bershatsky on Sat, 13 Feb 2016 19:40:34 -0800)

> Date:  Sat, 13 Feb 2016 19:40:34 -0800
> From:  Keith David Bershatsky <esq@lawlist.com>
> 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.





  reply	other threads:[~2016-02-14  6:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-12  2:12 bug#22637: 25.1.50; `mode-line` face `:height` incompatible with `scroll-conservatively 101` Keith David Bershatsky
2016-02-12  8:17 ` Eli Zaretskii
2016-02-12 16:17 ` Keith David Bershatsky
2016-02-12 19:40   ` Eli Zaretskii
2016-02-14  3:40 ` Keith David Bershatsky
2016-02-14  6:05   ` Eli Zaretskii [this message]
2016-02-14  7:55 ` Keith David Bershatsky
2016-02-14 19:26   ` Eli Zaretskii
2016-02-16  2:00 ` Keith David Bershatsky
2016-02-16  2:51 ` Keith David Bershatsky
2016-02-16 15:51   ` Eli Zaretskii
2022-02-10  8:09     ` Lars Ingebrigtsen
2022-02-10 12:33       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83io1rzv09.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=22637@debbugs.gnu.org \
    --cc=esq@lawlist.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).