changeset 24828:a3ddcd017066

(compute_motion): Fix boundary case.
author Karl Heuer <kwzh@gnu.org>
date Sat, 12 Jun 1999 03:50:37 +0000
parents 487fdbc8de0f
children 749c12791859
files src/indent.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/indent.c	Sat Jun 12 03:44:31 1999 +0000
+++ b/src/indent.c	Sat Jun 12 03:50:37 1999 +0000
@@ -1418,7 +1418,9 @@
 		      /* 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