]> code.delx.au - gnu-emacs/blobdiff - src/indent.c
Merged from emacs@sv.gnu.org
[gnu-emacs] / src / indent.c
index 9b5a9e32c793ab80e203d2c7a6a746e7251902ca..efc375e27f7598ccf73151ffd2aab741a073514c 100644 (file)
@@ -2109,7 +2109,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));
     }