From: storm@cua.dk (Kim F. Storm)
Subject: Re: set-window-vscroll causes infinite loop in redisplay
Date: 24 Feb 2003 16:47:34 +0100 [thread overview]
Message-ID: <5xsmudr889.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <5xheauqx9x.fsf@kfs2.cua.dk>
storm@cua.dk (Kim F. Storm) writes:
> This is with CVS head on GNU/Linux under X.
>
> 1) start emacs
>
> emacs -q
>
> 2) get rid of splash screen
>
> RET
>
> 3) In scratch buffer, enter:
>
> (set-window-vscroll nil 0.5) C-j
>
> 4) (try to) move cursor to the first (partially visible) line.
>
> C-p C-p C-p C-p C-p C-p C-p C-p
>
> 5) emacs loops.
>
>
>
> The following patch fixes this. I'll install it tomorrow unless
> someone finds a better fix.
I think the following fix is slightly better -- it retries the
recenter if vscroll was enabled. But it probably doesn't make much
visible difference...
Index: xdisp.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xdisp.c,v
retrieving revision 1.807
diff -c -r1.807 xdisp.c
*** xdisp.c 24 Feb 2003 07:57:55 -0000 1.807
--- xdisp.c 24 Feb 2003 14:46:05 -0000
***************
*** 10822,10827 ****
--- 10822,10835 ----
if (!make_cursor_line_fully_visible (w))
{
+ /* If vscroll is enabled, disable it and try again. */
+ if (w->vscroll)
+ {
+ w->vscroll = 0;
+ clear_glyph_matrix (w->desired_matrix);
+ goto recenter;
+ }
+
/* If centering point failed to make the whole line visible,
put point at the top instead. That has to make the whole line
visible, if it can be done. */
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2003-02-24 15:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-24 1:31 set-window-vscroll causes infinite loop in redisplay Kim F. Storm
2003-02-24 15:47 ` Kim F. Storm [this message]
2003-02-25 13:34 ` Kim F. Storm
[not found] ` <87u1et7mf2.fsf@computer.localdomain>
2003-02-26 0:20 ` Kim F. Storm
2003-02-26 9:47 ` Richard Stallman
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=5xsmudr889.fsf@kfs2.cua.dk \
--to=storm@cua.dk \
/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.