# HG changeset patch # User Richard M. Stallman # Date 816018493 0 # Node ID ea373c55ed955d3694cc131cbfe97e36f1c91cec # Parent 5aab5c1f2c3369e11877117de588017fd963201a (Fmove_to_column): Doc fix. (compute_motion): Update next_boundary when we skip to next newline. diff -r 5aab5c1f2c33 -r ea373c55ed95 src/indent.c --- a/src/indent.c Fri Nov 10 08:42:45 1995 +0000 +++ b/src/indent.c Fri Nov 10 15:48:13 1995 +0000 @@ -474,7 +474,9 @@ If it's past end of line, point goes to end of line.\n\n\ A non-nil second (optional) argument FORCE means, if the line\n\ is too short to reach column COLUMN then add spaces/tabs to get there,\n\ -and if COLUMN is in the middle of a tab character, change it to spaces.") +and if COLUMN is in the middle of a tab character, change it to spaces.\n\ +\n\ +The return value is the current column.") (column, force) Lisp_Object column, force; { @@ -764,6 +766,11 @@ /* Truncating: skip to newline. */ pos = find_before_next_newline (pos, to, 1); hpos = width; + /* If we just skipped next_boundary, + loop around in the main while + and handle it. */ + if (pos >= next_boundary) + next_boundary = pos + 1; } else { @@ -914,6 +921,11 @@ everything from a ^M to the end of the line is invisible. Stop *before* the real newline. */ pos = find_before_next_newline (pos, to, 1); + /* If we just skipped next_boundary, + loop around in the main while + and handle it. */ + if (pos > next_boundary) + next_boundary = pos; /* Allow for the " ..." that is displayed for them. */ if (selective_rlen) {