From: charles@aurox.ch (Charles A. Roelli)
To: Eli Zaretskii <eliz@gnu.org>
Cc: 29325@debbugs.gnu.org
Subject: bug#29325: 26.0.90: Info scrolling stuck
Date: Thu, 23 Nov 2017 21:08:45 +0100 [thread overview]
Message-ID: <m2vai0vjua.fsf@aurox.ch> (raw)
In-Reply-To: <83r2sqb9xp.fsf@gnu.org> (message from Eli Zaretskii on Wed, 22 Nov 2017 17:38:26 +0200)
> Date: Wed, 22 Nov 2017 17:38:26 +0200
> From: Eli Zaretskii <eliz@gnu.org>
>
> > > try_to_scroll looks like this:
> >
> > I suspect we shouldn't go there in this case.
>
> Actually, I think this code is not supposed to run in the case you
> describe, i.e. when the user invokes a scrolling command. So I think
> the root cause is elsewhere. Does the patch below fix the problem?
>
> diff --git a/src/window.c b/src/window.c
> index 7f47252..504dcd3 100644
> --- a/src/window.c
> +++ b/src/window.c
> @@ -5355,6 +5355,9 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
> /* We moved the window start towards BEGV, so PT may be now
> in the scroll margin at the bottom. */
> move_it_to (&it, PT, -1,
> + /* We subtract WINDOW_HEADER_LINE_HEIGHT because
> + it.y is relative to the bottom of the header
> + line, see above. */
> (it.last_visible_y - WINDOW_HEADER_LINE_HEIGHT (w)
> - partial_line_height (&it) - this_scroll_margin - 1),
> -1,
> @@ -5392,11 +5395,14 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
>
> /* See if point is on a partially visible line at the end. */
> if (it.what == IT_EOB)
> - partial_p = it.current_y + it.ascent + it.descent > it.last_visible_y;
> + partial_p =
> + it.current_y + it.ascent + it.descent
> + > it.last_visible_y - WINDOW_HEADER_LINE_HEIGHT (w);
> else
> {
> move_it_by_lines (&it, 1);
> - partial_p = it.current_y > it.last_visible_y;
> + partial_p =
> + it.current_y > it.last_visible_y - WINDOW_HEADER_LINE_HEIGHT (w);
> }
>
> if (charpos == PT && !partial_p
> @@ -5415,7 +5421,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
> goal_y = this_scroll_margin;
> SET_TEXT_POS_FROM_MARKER (start, w->start);
> start_display (&it, w, start);
> - /* It would be wrong to subtract CURRENT_HEADER_LINE_HEIGHT
> + /* It would be wrong to subtract WINDOW_HEADER_LINE_HEIGHT
> here because we called start_display again and did not
> alter it.current_y this time. */
> move_it_to (&it, -1, window_scroll_pixel_based_preserve_x,
I can confirm that it does fix the issue on GNU/Linux. Thanks again
for your help here.
next prev parent reply other threads:[~2017-11-23 20:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-16 19:41 bug#29325: 26.0.90: Info scrolling stuck Charles A. Roelli
2017-11-16 19:47 ` Eli Zaretskii
2017-11-16 20:45 ` Charles A. Roelli
2017-11-17 7:11 ` Eli Zaretskii
2017-11-19 16:49 ` Charles A. Roelli
2017-11-19 17:12 ` Eli Zaretskii
2017-11-20 19:52 ` Charles A. Roelli
2017-11-20 20:25 ` Eli Zaretskii
2017-11-21 19:24 ` Charles A. Roelli
2017-11-21 19:42 ` Eli Zaretskii
2017-11-21 19:58 ` Eli Zaretskii
2017-11-22 15:38 ` Eli Zaretskii
2017-11-22 19:04 ` Charles A. Roelli
2017-11-23 20:08 ` Charles A. Roelli [this message]
2017-11-23 20:31 ` Eli Zaretskii
2017-11-22 18:56 ` Charles A. Roelli
[not found] <<m2efoyvwoa.fsf@aurox.ch>
2017-11-16 22:35 ` Drew Adams
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2vai0vjua.fsf@aurox.ch \
--to=charles@aurox.ch \
--cc=29325@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.