Преглед на файлове

When a code editor is created, clear the history after setting the initial value.

Jason Grout преди 7 години
родител
ревизия
5a21d5ac4f
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      packages/codemirror/src/editor.ts

+ 1 - 0
packages/codemirror/src/editor.ts

@@ -120,6 +120,7 @@ class CodeMirrorEditor implements CodeEditor.IEditor {
 
     // Handle initial values for text, mimetype, and selections.
     doc.setValue(model.value.text);
+    this.clearHistory();
     this._onMimeTypeChanged();
     this._onCursorActivity();
     this._timer = window.setInterval(() => { this._checkSync(); }, 3000);