diff --git a/src/main/kotlin/com/dsoftware/ghmanager/ui/panels/LogConsolePanel.kt b/src/main/kotlin/com/dsoftware/ghmanager/ui/panels/LogConsolePanel.kt index c5685881..6e470736 100644 --- a/src/main/kotlin/com/dsoftware/ghmanager/ui/panels/LogConsolePanel.kt +++ b/src/main/kotlin/com/dsoftware/ghmanager/ui/panels/LogConsolePanel.kt @@ -13,6 +13,7 @@ import com.intellij.openapi.actionSystem.ActionManager import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.DefaultActionGroup import com.intellij.openapi.application.ApplicationManager +import com.intellij.openapi.application.runInEdt import com.intellij.openapi.editor.Editor import com.intellij.openapi.editor.actions.ToggleUseSoftWrapsToolbarAction import com.intellij.openapi.editor.colors.EditorColorsListener @@ -108,11 +109,11 @@ fun createLogConsolePanel( } } model.logModel.addAndInvokeListener { - addConsole(it) + runInEdt { addConsole(it) } } ApplicationManager.getApplication().messageBus.connect(parentDisposable) .subscribe(EditorColorsManager.TOPIC, EditorColorsListener { - addConsole(model.logModel.value) + runInEdt { addConsole(model.logModel.value) } }) return panel } \ No newline at end of file