X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/e2de799989c016cd5ee095aa7eef044b49189f38..9d74382f6f75aafbd7eab700107bb1e31f640c8a:/src/indent.c diff --git a/src/indent.c b/src/indent.c index cd44904458..cc928f2171 100644 --- a/src/indent.c +++ b/src/indent.c @@ -1,6 +1,6 @@ /* Indentation functions. Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1998, 2000, 2001, - 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -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)); }