summaryrefslogtreecommitdiff
path: root/src/indent.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/indent.c')
-rw-r--r--src/indent.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/indent.c b/src/indent.c
index b573c53e666..24645b104cf 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2092,8 +2092,9 @@ whether or not it is currently displayed in some window. */)
move_it_by_lines (&it, -1, 0);
it.vpos = 0;
- if (XINT (lines) != 0)
- move_it_by_lines (&it, XINT (lines), 0);
+ /* Do this even if LINES is 0, so that we move back
+ to the beginning of the current line as we ought. */
+ move_it_by_lines (&it, XINT (lines), 0);
SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
}