]> code.delx.au - gnu-emacs/commitdiff
(Fvertical_motion): Only try to move back if we can.
authorKim F. Storm <storm@cua.dk>
Wed, 22 Feb 2006 20:29:41 +0000 (20:29 +0000)
committerKim F. Storm <storm@cua.dk>
Wed, 22 Feb 2006 20:29:41 +0000 (20:29 +0000)
src/indent.c

index fa2acd0bc05f5946a923b3915ecfd780d8826ef4..cc928f2171fbbe96a5414f402a73147162eb542e 100644 (file)
@@ -2107,7 +2107,8 @@ whether or not it is currently displayed in some window.  */)
       it.vpos = 0;
       /* Do this even if LINES is 0, so that we move back
         to the beginning of the current line as we ought.  */
-      move_it_by_lines (&it, XINT (lines), 0);
+      if (XINT (lines) >= 0 || IT_CHARPOS (it) > 0)
+       move_it_by_lines (&it, XINT (lines), 0);
 
       SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
     }