From 4a379ac28b7984c0982605abb546dac75aa2f6b0 Mon Sep 17 00:00:00 2001 From: Liam <33645555+lj3954@users.noreply.github.com> Date: Sat, 21 Sep 2024 14:35:16 -0700 Subject: [PATCH] fix: Correctly enter up directories (..) --- tui/src/state.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tui/src/state.rs b/tui/src/state.rs index dfc6787ac..6fefdc3f7 100644 --- a/tui/src/state.rs +++ b/tui/src/state.rs @@ -479,7 +479,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);