diff --git a/tui/src/hint.rs b/tui/src/hint.rs index 034406db..cfdce25f 100644 --- a/tui/src/hint.rs +++ b/tui/src/hint.rs @@ -125,17 +125,15 @@ pub fn draw_shortcuts(state: &AppState, frame: &mut Frame, area: Rect) { if state.at_root() { hints.push(Shortcut::new(vec!["h", "Left"], "Focus tab list")); hints.extend(get_list_item_shortcut(state)); + } else if state.selected_item_is_up_dir() { + hints.push(Shortcut::new( + vec!["l", "Right", "Enter", "h", "Left"], + "Go to parent directory", + )); } else { - if state.selected_item_is_up_dir() { - hints.push(Shortcut::new( - vec!["l", "Right", "Enter", "h", "Left"], - "Go to parent directory", - )); - } else { - hints.push(Shortcut::new(vec!["h", "Left"], "Go to parent directory")); - hints.extend(get_list_item_shortcut(state)); - } - }; + hints.push(Shortcut::new(vec!["h", "Left"], "Go to parent directory")); + hints.extend(get_list_item_shortcut(state)); + } hints.push(Shortcut::new(vec!["k", "Up"], "Select item above")); hints.push(Shortcut::new(vec!["j", "Down"], "Select item below")); hints.push(Shortcut::new(vec!["t"], "Next theme"));