all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* set-window-vscroll causes infinite loop in redisplay
@ 2003-02-24  1:31 Kim F. Storm
  2003-02-24 15:47 ` Kim F. Storm
  2003-02-26  9:47 ` Richard Stallman
  0 siblings, 2 replies; 5+ messages in thread
From: Kim F. Storm @ 2003-02-24  1:31 UTC (permalink / 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.  */

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-02-26  9:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-24  1:31 set-window-vscroll causes infinite loop in redisplay Kim F. Storm
2003-02-24 15:47 ` 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

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.