clear history in the code mirror after setting a value, closes #766

This commit is contained in:
zadam 2020-03-10 22:51:44 +01:00
parent dc4024b6de
commit 8d45662bee

View file

@ -77,6 +77,7 @@ export default class CodeTypeWidget extends TypeWidget {
// CodeMirror breaks pretty badly on null so even though it shouldn't happen (guarded by consistency check)
// we provide fallback
this.codeEditor.setValue(noteComplement.content || "");
this.codeEditor.clearHistory();
const info = CodeMirror.findModeByMIME(note.mime);