From: Karl Heuer Date: Sat, 12 Jun 1999 03:50:37 +0000 (+0000) Subject: (compute_motion): Fix boundary case. X-Git-Tag: emacs-20.4~121 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a9a679b70ee79a68f2865c60572baa8acf6d44a5;p=emacs.git (compute_motion): Fix boundary case. --- diff --git a/src/indent.c b/src/indent.c index 9528894baf2..5e5c1a0a68d 100644 --- a/src/indent.c +++ b/src/indent.c @@ -1418,7 +1418,9 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, /* Skip any number of invisible lines all at once */ do { - pos = find_before_next_newline (pos, to, 1) + 1; + pos = find_before_next_newline (pos, to, 1); + if (pos < to) + pos++; pos_byte = CHAR_TO_BYTE (pos); } while (pos < to