aboutsummaryrefslogtreecommitdiff
path: root/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'text.c')
-rw-r--r--text.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/text.c b/text.c
index e8e08ee..a7016ca 100644
--- a/text.c
+++ b/text.c
@@ -680,6 +680,8 @@ static size_t action_redo(Text *txt, Action *a) {
for ( ; c; c = c->prev) {
span_swap(txt, &c->old, &c->new);
pos = c->pos;
+ if (c->new.len > c->old.len)
+ pos += c->new.len - c->old.len;
}
return pos;
}