summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/textarea.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop/textarea.c b/desktop/textarea.c
index 9c3243293..cf71264a2 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -2050,7 +2050,7 @@ bool textarea_keypress(struct textarea *ta, uint32_t key)
b_len = ta->lines[line].b_length;
l_len = utf8_bounded_length(
&(ta->text.data[b_off]),
- b_len);
+ b_len) - ta->caret_pos.char_off;
if (!textarea_replace_text(ta, caret,
caret + l_len, "", 0, false))
return false;