diff --git a/src/text-editor-element.coffee b/src/text-editor-element.coffee index 3313e3718..2e65a85c2 100644 --- a/src/text-editor-element.coffee +++ b/src/text-editor-element.coffee @@ -43,6 +43,7 @@ class TextEditorElement extends HTMLElement @mountComponent() @addGrammarScopeAttribute() @model.onDidChangeGrammar => @addGrammarScopeAttribute() + @model.onDidDestroy => @unmountComponent() @__spacePenView.setModel(@model) @model