fix: Correctly enter up directories (..) (#598)

This commit is contained in:
Liam 2024-09-22 11:11:43 -05:00 committed by GitHub
parent f6748caab7
commit 446d52ce7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -512,7 +512,8 @@ impl AppState {
}
pub fn selected_item_is_cmd(&self) -> bool {
!self.selected_item_is_dir()
// Any item that is not a directory or up directory (..) must be a command
!(self.selected_item_is_up_dir() || self.selected_item_is_dir())
}
pub fn selected_item_is_up_dir(&self) -> bool {
let selected_index = self.selection.selected().unwrap_or(0);