Skip to content

Commit a0e2011

Browse files
authored
Merge pull request #2768 from digma-ai/fix-code-context-change-when-editor-is-null
fix-code-context-change-when-editor-is-null
2 parents 5f819fe + 69e4797 commit a0e2011

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/kotlin/org/digma/intellij/plugin/ui/navigation/CodeContextUpdateService.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ class CodeContextUpdateService(private val project: Project, private val cs: Cor
172172
} else {
173173
empty()
174174
}
175+
}else{
176+
//if shouldRun is false (maybe user logged out)
177+
//or the editor is null, editor is null when there are no open editors. or the selectionChanged was with a null
178+
// editor, that will happen when opening a non-text editor or one of digma's editors like dashboard or jaeger.
179+
empty()
175180
}
176181
} catch (e: CancellationException) {
177182
throw e // 🔁 RE-THROW cancellation to properly cancel the coroutine

0 commit comments

Comments
 (0)