Update IdeProtocolClient.kt

This commit is contained in:
Test 2024-10-30 07:49:11 -07:00
parent 8a88dde238
commit 6ee0febabc

View file

@ -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) }
}
@ -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