diff --git a/crates/mipsy_web/index.html b/crates/mipsy_web/index.html index 0f8b07a..9d09be6 100644 --- a/crates/mipsy_web/index.html +++ b/crates/mipsy_web/index.html @@ -131,7 +131,11 @@ } function set_editor_value(value="") { - window.editor.setValue(value); + // Don't unnecesarily call editor.setValue(), + // since setValue will also reset undo history. + if (get_editor_value() !== value) { + window.editor.setValue(value); + } } function get_editor_value() {