GNU bug report logs - #14780
Regression: C-n doesn't go to next line under simple circumstances

Previous Next

Package: emacs;

Reported by: Barry OReilly <gundaetiapo <at> gmail.com>

Date: Wed, 3 Jul 2013 16:04:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: gundaetiapo <at> gmail.com
Cc: 14780 <at> debbugs.gnu.org
Subject: bug#14780: Regression: C-n doesn't go to next line under	simple	circumstances
Date: Sat, 20 Jul 2013 11:33:07 +0300
Does the following fix the problem for you?

=== modified file 'src/xdisp.c'
--- src/xdisp.c	2013-07-16 21:35:45 +0000
+++ src/xdisp.c	2013-07-20 08:21:36 +0000
@@ -15592,7 +15592,8 @@ redisplay_window (Lisp_Object window, in
 	     Move it back to a fully-visible line.  */
 	  new_vpos = window_box_height (w);
 	}
-      else if (w->cursor.vpos >=0)
+      else if (w->cursor.vpos >=0
+	       && PT >= BEGV && PT < ZV)
 	{
 	  /* Some people insist on not letting point enter the scroll
 	     margin, even though this part handles windows that didn't
@@ -15619,7 +15620,16 @@ redisplay_window (Lisp_Object window, in
 	      if (header_line)
 		window_height += CURRENT_HEADER_LINE_HEIGHT (w);
 	      if (w->cursor.y >= window_height - pixel_margin)
-		new_vpos = window_height - pixel_margin;
+		{
+		  struct text_pos pos;
+
+		  SET_TEXT_POS (pos, PT, PT_BYTE);
+		  start_display (&it, w, pos);
+		  it.current_y = it.vpos = 0;
+		  move_it_to (&it, ZV, -1, -1, -1, MOVE_TO_POS);
+		  if (it.vpos > margin)
+		    new_vpos = window_height - pixel_margin;
+		}
 	    }
 	}
 





This bug report was last modified 11 years and 309 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.