We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec7a607 commit 1abd39fCopy full SHA for 1abd39f
core/src/main/kotlin/cc/unitmesh/devti/sketch/SketchInputListener.kt
@@ -15,6 +15,7 @@ import com.intellij.openapi.application.ApplicationManager
15
import com.intellij.openapi.application.invokeLater
16
import com.intellij.openapi.application.runReadAction
17
import com.intellij.openapi.project.Project
18
+import kotlinx.coroutines.cancel
19
import kotlinx.coroutines.flow.cancellable
20
import kotlinx.coroutines.launch
21
@@ -67,6 +68,11 @@ class SketchInputListener(
67
68
suggestion.append(char)
69
70
invokeLater {
71
+ if (project.isDisposed) {
72
+ cancel()
73
+ return@invokeLater
74
+ }
75
+
76
toolWindow.onUpdate(suggestion.toString())
77
}
78
0 commit comments