Skip to content

Commit

Permalink
fix:run in edt
Browse files Browse the repository at this point in the history
fix #106
  • Loading branch information
cunla committed Dec 4, 2023
1 parent b538452 commit 0cce775
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

0 comments on commit 0cce775

Please sign in to comment.