From 5809bcefa6bcff43a9d2208725105e4469624d28 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 1 Oct 2013 14:03:02 +0100 Subject: Wipe undo buffer on textarea_set_text. --- desktop/textarea.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'desktop/textarea.c') 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) { -- cgit v1.2.3