Skip to content

Commit 647a2be

Browse files
committed
Fixed source JAR go to definition when KLS is disabled
1 parent 323e6f0 commit 647a2be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/main/kotlin/org/javacs/kt/definition/GoToDefinition.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ fun goToDefinition(
6363
// since the client has not opted into
6464
// or does not support KLS URIs
6565
val tmpFile = cachedTempFiles[klsSourceURI] ?: run {
66-
val (name, extension) = klsSourceURI.fileName.partitionAroundLast(".")
66+
val (name, rest) = klsSourceURI.fileName.partitionAroundLast(".")
67+
val extension = rest.split("?")[0]
6768
tempDir.createTempFile(name, extension)
6869
.also {
6970
it.toFile().writeText(content)

0 commit comments

Comments
 (0)