diff --git a/src/main/kotlin/app/termora/NewHostTree.kt b/src/main/kotlin/app/termora/NewHostTree.kt index 05b52e6..610fa0b 100644 --- a/src/main/kotlin/app/termora/NewHostTree.kt +++ b/src/main/kotlin/app/termora/NewHostTree.kt @@ -135,6 +135,7 @@ class NewHostTree : SimpleTree() { // double click addMouseListener(object : MouseAdapter() { override fun mouseClicked(e: MouseEvent) { + if (getPathForLocation(e.x, e.y) == null) return if (doubleClickConnection && SwingUtilities.isLeftMouseButton(e) && e.clickCount % 2 == 0) { val lastNode = lastSelectedPathComponent as? HostTreeNode ?: return if (lastNode.host.protocol != Protocol.Folder) {