Skip to content

Commit

Permalink
Update IdeProtocolClient.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick-Erichsen committed Oct 30, 2024
1 parent 8a88dde commit 6ee0feb
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,9 @@ class IdeProtocolClient(
val folders = mutableListOf<String>()
fun findNestedFolders(dirPath: String) {
val dir = File(dirPath)
val nestedFolders = dir.listFiles { file -> file.isDirectory }?.map { file -> file.absolutePath } ?: emptyList()
val nestedFolders =
dir.listFiles { file -> file.isDirectory }?.map { file -> file.absolutePath }
?: emptyList()
folders.addAll(nestedFolders);
nestedFolders.forEach { folder -> findNestedFolders(folder) }
}
Expand Down Expand Up @@ -642,10 +644,10 @@ class IdeProtocolClient(
respond(null)
return@launch
}

if (editor.document.text.trim().isEmpty()) {
WriteCommandAction.runWriteCommandAction(project) {
document.insertString(0, text)
editor.document.insertString(0, text)
}
respond(null)
return@launch
Expand Down

0 comments on commit 6ee0feb

Please sign in to comment.