mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-12-25 04:49:44 +00:00
Collapsed if statements (#534)
This commit is contained in:
parent
3497b63071
commit
d0ff354c49
|
@ -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"));
|
||||
|
|
Loading…
Reference in New Issue
Block a user