mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-05 13:15:21 +00:00
fix: Correctly enter up directories (..) (#598)
This commit is contained in:
parent
f6748caab7
commit
446d52ce7c
|
@ -512,7 +512,8 @@ impl AppState {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn selected_item_is_cmd(&self) -> bool {
|
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 {
|
pub fn selected_item_is_up_dir(&self) -> bool {
|
||||||
let selected_index = self.selection.selected().unwrap_or(0);
|
let selected_index = self.selection.selected().unwrap_or(0);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user