aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/indent.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/indent.c b/src/indent.c
index 047f9e82262..0d49c9515cc 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1095,6 +1095,26 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width,
1095 int pos_here = pos; 1095 int pos_here = pos;
1096 int newpos; 1096 int newpos;
1097 1097
1098 /* Don't skip invisible if we are already at the margin. */
1099 if (vpos > tovpos || vpos == tovpos && hpos >= tohpos)
1100 {
1101 if (contin_hpos && prev_hpos == 0
1102 && hpos > tohpos
1103 && (contin_hpos == width || wide_column_end_hpos > width))
1104 { /* Line breaks because we can't put the character at the
1105 previous line any more. It is not the multi-column
1106 character continued in middle. Go back to previous
1107 buffer position, screen position, and set tab offset
1108 to previous value. It's the beginning of the
1109 line. */
1110 pos = prev_pos;
1111 pos_byte = prev_pos_byte;
1112 hpos = prev_hpos;
1113 tab_offset = prev_tab_offset;
1114 }
1115 break;
1116 }
1117
1098 /* If the caller says that the screen position came from an earlier 1118 /* If the caller says that the screen position came from an earlier
1099 call to compute_motion, then we've already accounted for the 1119 call to compute_motion, then we've already accounted for the
1100 overlay strings at point. This is only true the first time 1120 overlay strings at point. This is only true the first time