From 8d45662bee74cbdf48b3a370b9a54a6921924cf7 Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 10 Mar 2020 22:51:44 +0100 Subject: [PATCH] clear history in the code mirror after setting a value, closes #766 --- src/public/javascripts/widgets/type_widgets/code.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/public/javascripts/widgets/type_widgets/code.js b/src/public/javascripts/widgets/type_widgets/code.js index 688ce20a6..5a027b6d0 100644 --- a/src/public/javascripts/widgets/type_widgets/code.js +++ b/src/public/javascripts/widgets/type_widgets/code.js @@ -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);