mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-05 13:15:21 +00:00
Fix selected-cmd bug (#638)
This commit is contained in:
parent
8111649c8c
commit
b549510895
|
@ -615,7 +615,8 @@ impl AppState {
|
||||||
|
|
||||||
pub fn selected_item_is_cmd(&self) -> bool {
|
pub fn selected_item_is_cmd(&self) -> bool {
|
||||||
// Any item that is not a directory or up directory (..) must be a command
|
// 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())
|
self.selection.selected().is_some()
|
||||||
|
&& !(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