Skip to content
This repository was archived by the owner on Sep 17, 2023. It is now read-only.

Commit 490fda5

Browse files
committed
Fix unexpected crash in kotlin lsp
1 parent c48a55f commit 490fda5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/kotlin/org/cosmicide/rewrite/editor/language/KotlinLanguage.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ class KotlinLanguage(
6969
)
7070
}
7171
}
72+
val ktFile = kotlinEnvironment.kotlinFiles[file.absolutePath]?.kotlinFile ?: return@launch
7273
kotlinEnvironment.analysisOf(kotlinEnvironment.kotlinFiles.map {
7374
it.value.kotlinFile
74-
}, kotlinEnvironment.kotlinFiles[file.absolutePath]!!.kotlinFile)
75+
}, ktFile)
7576

7677
editor.post {
7778
editor.diagnostics = container

0 commit comments

Comments
 (0)