all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Subject: set-window-vscroll causes infinite loop in redisplay
Date: 24 Feb 2003 02:31:54 +0100	[thread overview]
Message-ID: <5xheauqx9x.fsf@kfs2.cua.dk> (raw)


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.

Index: xdisp.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xdisp.c,v
retrieving revision 1.806
diff -c -r1.806 xdisp.c
*** xdisp.c	18 Feb 2003 00:17:17 -0000	1.806
--- xdisp.c	24 Feb 2003 00:31:05 -0000
***************
*** 10821,10826 ****
--- 10821,10834 ----
  
    if (!make_cursor_line_fully_visible (w))
      {
+       /* If vscroll is non-zero, and the cursor is on the top line,
+ 	 disable vscroll, and retry. */
+       if (w->vscroll < 0 && w->cursor.y < 0)
+ 	{
+ 	  w->vscroll = 0;
+ 	  clear_glyph_matrix (w->desired_matrix);
+ 	}
+ 
        /* 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.  */

             reply	other threads:[~2003-02-24  1:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-24  1:31 Kim F. Storm [this message]
2003-02-24 15:47 ` set-window-vscroll causes infinite loop in redisplay Kim F. Storm
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=5xheauqx9x.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.