diff --git a/tui/src/hint.rs b/tui/src/hint.rs index 27474ea9..37947159 100644 --- a/tui/src/hint.rs +++ b/tui/src/hint.rs @@ -16,7 +16,7 @@ pub struct ShortcutList { } pub struct Shortcut { - pub key_sequenses: Vec>, + pub key_sequences: Vec>, pub desc: &'static str, } @@ -75,7 +75,7 @@ impl ShortcutList { impl Shortcut { pub fn new(key_sequences: Vec<&'static str>, desc: &'static str) -> Self { Self { - key_sequenses: key_sequences + key_sequences: key_sequences .iter() .map(|s| Span::styled(*s, Style::default().bold())) .collect(), @@ -85,7 +85,7 @@ impl Shortcut { fn to_spans(&self) -> Vec { let mut ret: Vec<_> = self - .key_sequenses + .key_sequences .iter() .flat_map(|seq| { [ @@ -124,10 +124,10 @@ pub fn draw_shortcuts(state: &AppState, frame: &mut Frame, area: Rect) { if state.selected_item_is_up_dir() { hints.push(Shortcut::new( vec!["l", "Right", "Enter", "h", "Left"], - "Go to parrent directory", + "Go to parent directory", )); } else { - hints.push(Shortcut::new(vec!["h", "Left"], "Go to parrent directory")); + hints.push(Shortcut::new(vec!["h", "Left"], "Go to parent directory")); hints.push(get_list_item_shortcut(state)); if state.selected_item_is_cmd() { hints.push(Shortcut::new(vec!["p"], "Enable preview")); diff --git a/tui/src/state.rs b/tui/src/state.rs index 267e6769..8d1e1d7b 100644 --- a/tui/src/state.rs +++ b/tui/src/state.rs @@ -26,7 +26,7 @@ pub struct AppState { tabs: Vec, /// Current tab current_tab: ListState, - /// This stack keeps track of our "current dirrectory". You can think of it as `pwd`. but not + /// This stack keeps track of our "current directory". You can think of it as `pwd`. but not /// just the current directory, all paths that took us here, so we can "cd .." visit_stack: Vec, /// This is the state asociated with the list widget, used to display the selection in the @@ -246,7 +246,7 @@ impl AppState { *self.visit_stack.last().unwrap(), ); } - /// Checks ehther the current tree node is the root node (can we go up the tree or no) + /// Checks either the current tree node is the root node (can we go up the tree or no) /// Returns `true` if we can't go up the tree (we are at the tree root) /// else returns `false` pub fn at_root(&self) -> bool {