From 8861f16f6a11cafe7d3aad8402c345564431ff09 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 28 Jun 1996 18:55:04 +0000 Subject: [PATCH] (Fmove_to_column): Go after invis chars at the goal column. --- src/indent.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/indent.c b/src/indent.c index 60641ae54dc..d77219484b7 100644 --- a/src/indent.c +++ b/src/indent.c @@ -693,7 +693,7 @@ The return value is the current column.") col = 0; } - while (col < goal && pos < end) + while (pos < end) { while (pos == next_boundary) { @@ -702,6 +702,12 @@ The return value is the current column.") goto endloop; } + /* Test reaching the goal column. We do this after skipping + invisible characters, so that we put point before the + character on which the cursor will appear. */ + if (col >= goal) + break; + c = FETCH_CHAR (pos); if (dp != 0 && VECTORP (DISP_CHAR_VECTOR (dp, c))) { -- 2.39.2