diff --git a/lib/suggestion-list.js b/lib/suggestion-list.js index 1c54d524..267b03f0 100644 --- a/lib/suggestion-list.js +++ b/lib/suggestion-list.js @@ -275,7 +275,9 @@ class SuggestionList { this.overlayDecoration = editor.decorateMarker(marker, {type: 'overlay', item: this.suggestionListElement, position: 'tail', class: 'autocomplete-plus'}) const editorElement = atom.views.getView(this.activeEditor) if (editorElement && editorElement.classList) { - editorElement.classList.add('autocomplete-active') + atom.views.updateDocument(() => { + editorElement.classList.add('autocomplete-active') + }); } this.addBindings(editor) @@ -295,7 +297,9 @@ class SuggestionList { this.activeEditor = editor const editorElement = atom.views.getView(this.activeEditor) if (editorElement && editorElement.classList) { - editorElement.classList.add('autocomplete-active') + atom.views.updateDocument(() => { + editorElement.classList.add('autocomplete-active') + }); } this.overlayDecoration = editor.decorateMarker(marker, {type: 'overlay', item: this.suggestionListElement, class: 'autocomplete-plus'})