Wipe undo buffer on textarea_set_text.

This commit is contained in:
Michael Drake 2013-10-01 14:03:02 +01:00
parent 3bdc61a131
commit 5809bcefa6
1 changed files with 3 additions and 0 deletions

View File

@ -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) {