summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-10-01 14:03:02 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-10-01 14:03:02 +0100
commit5809bcefa6bcff43a9d2208725105e4469624d28 (patch)
treedef2f2484f670eca9227de367bdb842d70d3e999
parent3bdc61a13186699a9f9ad955ab1c8fbf5e8f032c (diff)
downloadnetsurf-5809bcefa6bcff43a9d2208725105e4469624d28.tar.gz
netsurf-5809bcefa6bcff43a9d2208725105e4469624d28.tar.bz2
Wipe undo buffer on textarea_set_text.
-rw-r--r--desktop/textarea.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/desktop/textarea.c b/desktop/textarea.c
index 8afe12711..a1ebe0ddc 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -1979,6 +1979,9 @@ bool textarea_set_text(struct textarea *ta, const char *text)
ta->text.len = len;
ta->text.utf8_len = utf8_length(ta->text.data);
+ ta->undo.next_detail = 0;
+ ta->undo.last_detail = 0;
+
textarea_normalise_text(ta, 0, len);
if (ta->flags & TEXTAREA_MULTILINE) {