1
0
mirror of https://github.com/chylex/IntelliJ-Keyboard-Master.git synced 2025-04-23 02:15:42 +02:00

Fix not scrolling selected row into view when jumping to first/last sibling

This commit is contained in:
chylex 2024-05-16 12:32:22 +02:00
parent 401d5101e7
commit b1d5c57e04
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548

View File

@ -85,7 +85,7 @@ internal object VimTreeNavigation {
val parentPath = path.parentPath ?: return
val parentRow = tree.getRowForPath(parentPath)
tree.setSelectionRow(parentRow + 1)
selectRow(tree, parentRow + 1)
}
}
@ -111,7 +111,12 @@ internal object VimTreeNavigation {
}
}
tree.setSelectionRow(targetRow)
selectRow(tree, targetRow)
}
}
private fun selectRow(tree: JTree, row: Int) {
tree.setSelectionRow(row)
tree.scrollRowToVisible(row)
}
}