aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/indent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/indent.c b/src/indent.c
index edb445c296f..ba4787aa1c5 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2109,7 +2109,7 @@ whether or not it is currently displayed in some window. */)
2109 } 2109 }
2110 else 2110 else
2111 { 2111 {
2112 if (IT_CHARPOS (it) > PT) 2112 if (IT_CHARPOS (it) > it_start)
2113 { 2113 {
2114 /* IT may move too far if truncate-lines is on and PT 2114 /* IT may move too far if truncate-lines is on and PT
2115 lies beyond the right margin. In that case, 2115 lies beyond the right margin. In that case,
@@ -2135,7 +2135,7 @@ whether or not it is currently displayed in some window. */)
2135 from the last line that it occupies. */ 2135 from the last line that it occupies. */
2136 if (PT < ZV) 2136 if (PT < ZV)
2137 { 2137 {
2138 while (IT_CHARPOS (it) <= PT) 2138 while (IT_CHARPOS (it) <= it_start)
2139 { 2139 {
2140 it.vpos = 0; 2140 it.vpos = 0;
2141 move_it_by_lines (&it, 1, 0); 2141 move_it_by_lines (&it, 1, 0);