aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2004-11-14 04:13:54 +0000
committerRichard M. Stallman2004-11-14 04:13:54 +0000
commit9136818a8176838750326ff735f6cbcd76a26751 (patch)
tree9436283a5d2f2b19bf819f64b70fef54db602a8d /src
parent6367b616326d3ea42a97f6778da27d97c11607b9 (diff)
downloademacs-9136818a8176838750326ff735f6cbcd76a26751.tar.gz
emacs-9136818a8176838750326ff735f6cbcd76a26751.zip
(Fvertical_motion): Scan to PT from start of line to make iterator consistent.
Diffstat (limited to 'src')
-rw-r--r--src/indent.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/indent.c b/src/indent.c
index 23c6cb1986d..603c0afe38c 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2064,13 +2064,16 @@ whether or not it is currently displayed in some window. */)
2064 SET_TEXT_POS (pt, PT, PT_BYTE); 2064 SET_TEXT_POS (pt, PT, PT_BYTE);
2065 start_display (&it, w, pt); 2065 start_display (&it, w, pt);
2066 2066
2067 /* Move to the start of the display line containing PT. If we don't 2067 /* Scan from the start of the line containing PT. If we don't
2068 do this, we start moving with IT->current_x == 0, while PT is 2068 do this, we start moving with IT->current_x == 0, while PT is
2069 really at some x > 0. The effect is, in continuation lines, that 2069 really at some x > 0. The effect is, in continuation lines, that
2070 we end up with the iterator placed at where it thinks X is 0, 2070 we end up with the iterator placed at where it thinks X is 0,
2071 while the end position is really at some X > 0, the same X that 2071 while the end position is really at some X > 0, the same X that
2072 PT had. */ 2072 PT had. */
2073 move_it_by_lines (&it, 0, 0); 2073 reseat_at_previous_visible_line_start (&it);
2074 it.current_x = it.hpos = 0;
2075 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
2076 it.vpos = 0;
2074 2077
2075 if (XINT (lines) != 0) 2078 if (XINT (lines) != 0)
2076 move_it_by_lines (&it, XINT (lines), 0); 2079 move_it_by_lines (&it, XINT (lines), 0);