summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dispnew.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 165b6e4757b..78d3748c259 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -3482,6 +3482,7 @@ direct_output_for_insert (g)
it.current_y = w->cursor.y;
it.end_charpos = PT;
it.stop_charpos = min (PT, it.stop_charpos);
+ it.stop_charpos = max (IT_CHARPOS (it), it.stop_charpos);
/* More than one display element may be returned for PT - 1 if
(i) it's a control character which is translated into `\003' or