mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-24 22:14:28 +00:00
fix typos
This commit is contained in:
parent
1a17dbf2ac
commit
3f67abc918
|
@ -16,7 +16,7 @@ pub struct ShortcutList {
|
|||
}
|
||||
|
||||
pub struct Shortcut {
|
||||
pub key_sequenses: Vec<Span<'static>>,
|
||||
pub key_sequences: Vec<Span<'static>>,
|
||||
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<Span> {
|
||||
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"));
|
||||
|
|
|
@ -26,7 +26,7 @@ pub struct AppState {
|
|||
tabs: Vec<Tab>,
|
||||
/// 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<NodeId>,
|
||||
/// 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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user