diff --git a/CHANGELOG.md b/CHANGELOG.md index e4062836..4a9c6ade 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -212,7 +212,7 @@ Bugfix followup release - check `0.22.0` notes for more infos! ### Added * stack popups ([#846](https://github.com/extrawurst/gitui/issues/846)) * file history log [[@cruessler](https://github.com/cruessler)] ([#381](https://github.com/extrawurst/gitui/issues/381)) -* termux support on andriod [[@PeroSar](https://github.com/PeroSar)] ([#1139](https://github.com/extrawurst/gitui/issues/1139)) +* termux support on android [[@PeroSar](https://github.com/PeroSar)] ([#1139](https://github.com/extrawurst/gitui/issues/1139)) * use `GIT_DIR` and `GIT_WORK_DIR` from environment if set ([#1191](https://github.com/extrawurst/gitui/pull/1191)) * new [FAQ](./FAQ.md)s page * mention macports in install section [[@fs111](https://github.com/fs111)]([#1237](https://github.com/extrawurst/gitui/pull/1237)) @@ -648,7 +648,7 @@ Thanks for your interest and support over this year! Read more about the 1 year - min size for relative popups on small terminals ([#179](https://github.com/extrawurst/gitui/issues/179)) - fix crash on resizing terminal to very small width ([#198](https://github.com/extrawurst/gitui/issues/198)) - fix broken tags when using a different internal representation ([#206](https://github.com/extrawurst/gitui/issues/206)) -- tags are not cleanly seperated in details view ([#212](https://github.com/extrawurst/gitui/issues/212)) +- tags are not cleanly separated in details view ([#212](https://github.com/extrawurst/gitui/issues/212)) ## [0.8.1] - 2020-07-07 @@ -814,7 +814,7 @@ Thanks for your interest and support over this year! Read more about the 1 year ### Changed - show longer commit messages in log view -- introduce propper error handling in `asyncgit` [[@MCord](https://github.com/MCord)]([#53](https://github.com/extrawurst/gitui/issues/53)) +- introduce proper error handling in `asyncgit` [[@MCord](https://github.com/MCord)]([#53](https://github.com/extrawurst/gitui/issues/53)) - better error message when trying to run outside of a valid git repo ([#56](https://github.com/extrawurst/gitui/issues/56)) - improve ctrl+c handling so it is checked first and no component needs to worry of blocking it diff --git a/asyncgit/src/asyncjob/mod.rs b/asyncgit/src/asyncjob/mod.rs index d92be0de..3c8564c5 100644 --- a/asyncgit/src/asyncjob/mod.rs +++ b/asyncgit/src/asyncjob/mod.rs @@ -21,7 +21,7 @@ impl /// send an intermediate update notification. /// do not confuse this with the return value of `run`. /// `send` should only be used about progress notifications - /// and not for the final notifcation indicating the end of the async job. + /// and not for the final notification indicating the end of the async job. /// see `run` for more info pub fn send(&self, notification: T) -> Result<()> { self.sender.send(notification)?; @@ -191,10 +191,10 @@ mod test { value_to_add: u32, } - type TestNotificaton = (); + type TestNotification = (); impl AsyncJob for TestJob { - type Notification = TestNotificaton; + type Notification = TestNotification; type Progress = (); fn run( diff --git a/asyncgit/src/remote_progress.rs b/asyncgit/src/remote_progress.rs index 0270e926..2e84f6bd 100644 --- a/asyncgit/src/remote_progress.rs +++ b/asyncgit/src/remote_progress.rs @@ -66,7 +66,7 @@ impl RemoteProgress { Ok(()) } - /// spawn thread to listen to progress notifcations coming in from blocking remote git method (fetch/push) + /// spawn thread to listen to progress notifications coming in from blocking remote git method (fetch/push) pub(crate) fn spawn_receiver_thread< T: 'static + AsyncProgress, >( diff --git a/asyncgit/src/sync/branch/merge_commit.rs b/asyncgit/src/sync/branch/merge_commit.rs index f3d5bf10..ec1ea498 100644 --- a/asyncgit/src/sync/branch/merge_commit.rs +++ b/asyncgit/src/sync/branch/merge_commit.rs @@ -263,7 +263,7 @@ mod test { ) .unwrap(); - //this should not have commited cause we left conflicts behind + //this should not have committed cause we left conflicts behind assert_eq!(res, None); let state = crate::sync::repo_state( diff --git a/asyncgit/src/sync/branch/merge_rebase.rs b/asyncgit/src/sync/branch/merge_rebase.rs index e1c9c9fb..a35784be 100644 --- a/asyncgit/src/sync/branch/merge_rebase.rs +++ b/asyncgit/src/sync/branch/merge_rebase.rs @@ -10,7 +10,7 @@ use crate::{ use git2::BranchType; use scopetime::scope_time; -/// trys merging current branch with its upstrema using rebase +/// tries merging current branch with its upstream using rebase pub fn merge_upstream_rebase( repo_path: &RepoPath, branch_name: &str, diff --git a/asyncgit/src/sync/branch/mod.rs b/asyncgit/src/sync/branch/mod.rs index fce485d9..4dbe89aa 100644 --- a/asyncgit/src/sync/branch/mod.rs +++ b/asyncgit/src/sync/branch/mod.rs @@ -384,7 +384,7 @@ pub fn checkout_remote_branch( if let Err(e) = repo.checkout_head(Some( git2::build::CheckoutBuilder::new().force(), )) { - // This is safe beacuse cur_ref was just found + // This is safe because cur_ref was just found repo.set_head(bytes2string(cur_ref.name_bytes())?.as_str())?; return Err(Error::Git(e)); } diff --git a/asyncgit/src/sync/mod.rs b/asyncgit/src/sync/mod.rs index 83683a9e..c188f28c 100644 --- a/asyncgit/src/sync/mod.rs +++ b/asyncgit/src/sync/mod.rs @@ -318,7 +318,7 @@ mod tests { eprintln!("\n----\n{cmd}"); } - /// helper to fetch commmit details using log walker + /// helper to fetch commit details using log walker pub fn get_commit_ids( r: &Repository, max_count: usize, diff --git a/asyncgit/src/sync/remotes/mod.rs b/asyncgit/src/sync/remotes/mod.rs index 83887beb..3c68dcec 100644 --- a/asyncgit/src/sync/remotes/mod.rs +++ b/asyncgit/src/sync/remotes/mod.rs @@ -254,7 +254,7 @@ mod tests { &format!("git remote add origin {remote_path}")[..], ); - //NOTE: aparently remotes are not chronolically sorted but alphabetically + //NOTE: apparently remotes are not chronolically sorted but alphabetically let remotes = get_remotes(repo_path).unwrap(); assert_eq!( diff --git a/asyncgit/src/sync/reword.rs b/asyncgit/src/sync/reword.rs index 4259498d..aa1786fc 100644 --- a/asyncgit/src/sync/reword.rs +++ b/asyncgit/src/sync/reword.rs @@ -49,7 +49,7 @@ fn get_current_branch( /// Changes the commit message of a commit with a specified oid /// /// While this function is most commonly associated with doing a -/// reword opperation in an interactive rebase, that is not how it +/// reword operation in an interactive rebase, that is not how it /// is implemented in git2rs /// /// This is dangerous if it errors, as the head will be detached so this should diff --git a/asyncgit/src/sync/staging/mod.rs b/asyncgit/src/sync/staging/mod.rs index 9b404e7f..d037499a 100644 --- a/asyncgit/src/sync/staging/mod.rs +++ b/asyncgit/src/sync/staging/mod.rs @@ -100,13 +100,13 @@ pub(crate) fn apply_selection( }; if !first_hunk_encountered { - let any_slection_in_hunk = + let any_selection_in_hunk = hunk.lines.iter().any(|line| { let line: DiffLinePosition = line.into(); lines.contains(&line) }); - first_hunk_encountered = any_slection_in_hunk; + first_hunk_encountered = any_selection_in_hunk; } if first_hunk_encountered { diff --git a/asyncgit/src/sync/stash.rs b/asyncgit/src/sync/stash.rs index fc5d69b7..009d5f84 100644 --- a/asyncgit/src/sync/stash.rs +++ b/asyncgit/src/sync/stash.rs @@ -213,7 +213,7 @@ mod tests { } #[test] - fn test_stash_without_2nd_parent() -> Result<()> { + fn test_stash_without_second_parent() -> Result<()> { let file_path1 = Path::new("file1.txt"); let (_td, repo) = repo_init()?; let root = repo.path().parent().unwrap(); diff --git a/asyncgit/src/sync/status.rs b/asyncgit/src/sync/status.rs index 962226d9..1cd5bcc8 100644 --- a/asyncgit/src/sync/status.rs +++ b/asyncgit/src/sync/status.rs @@ -126,7 +126,7 @@ pub fn is_workdir_clean( Ok(statuses.is_empty()) } -/// gurantees sorting +/// guarantees sorting pub fn get_status( repo_path: &RepoPath, status_type: StatusType, diff --git a/filetreelist/src/filetreeitems.rs b/filetreelist/src/filetreeitems.rs index dfd94954..d9c38f7a 100644 --- a/filetreelist/src/filetreeitems.rs +++ b/filetreelist/src/filetreeitems.rs @@ -590,7 +590,7 @@ mod tests { assert_eq!(it.next(), None); } - pub fn get_visibles(tree: &FileTreeItems) -> Vec { + pub fn get_visible(tree: &FileTreeItems) -> Vec { tree.tree_items .iter() .map(|e| e.info().is_visible()) @@ -614,7 +614,7 @@ mod tests { tree.collapse(1, false); - let visibles = get_visibles(&tree); + let visibles = get_visible(&tree); assert_eq!( visibles, @@ -628,7 +628,7 @@ mod tests { tree.expand(1, false); - let visibles = get_visibles(&tree); + let visibles = get_visible(&tree); assert_eq!( visibles, @@ -661,7 +661,7 @@ mod tests { tree.collapse(0, false); assert_eq!( - get_visibles(&tree), + get_visible(&tree), vec![ true, // false, // @@ -674,7 +674,7 @@ mod tests { tree.expand(0, false); assert_eq!( - get_visibles(&tree), + get_visible(&tree), vec![ true, // true, // @@ -702,7 +702,7 @@ mod tests { tree.collapse(0, false); - let visibles = get_visibles(&tree); + let visibles = get_visible(&tree); assert_eq!( visibles, @@ -732,7 +732,7 @@ mod tests { tree.collapse(1, false); - let visibles = get_visibles(&tree); + let visibles = get_visible(&tree); assert_eq!( visibles, @@ -746,7 +746,7 @@ mod tests { tree.collapse(0, false); - let visibles = get_visibles(&tree); + let visibles = get_visible(&tree); assert_eq!( visibles, @@ -760,10 +760,10 @@ mod tests { tree.expand(0, false); - let visibles = get_visibles(&tree); + let visible = get_visible(&tree); assert_eq!( - visibles, + visible, vec![ true, // true, // @@ -799,7 +799,7 @@ mod tests { assert!(!tree.tree_items[3].kind().is_path_collapsed()); assert_eq!( - get_visibles(&tree), + get_visible(&tree), vec![ true, // true, // @@ -828,7 +828,7 @@ mod tests { tree.collapse(0, true); assert_eq!( - get_visibles(&tree), + get_visible(&tree), vec![ true, // false, // @@ -840,7 +840,7 @@ mod tests { assert_eq!(res, 2); assert_eq!( - get_visibles(&tree), + get_visible(&tree), vec![ true, // true, // @@ -872,7 +872,7 @@ mod tests { assert_eq!(res, 4); assert_eq!( - get_visibles(&tree), + get_visible(&tree), vec![ true, // true, // @@ -898,7 +898,7 @@ mod tests { tree.collapse(0, true); assert_eq!( - get_visibles(&tree), + get_visible(&tree), vec![ true, // false, // @@ -911,7 +911,7 @@ mod tests { assert!(!tree.tree_items[0].kind().is_path_collapsed()); assert_eq!( - get_visibles(&tree), + get_visible(&tree), vec![ true, // true, // diff --git a/src/components/changes.rs b/src/components/changes.rs index e2a32cb0..cf241156 100644 --- a/src/components/changes.rs +++ b/src/components/changes.rs @@ -72,8 +72,8 @@ impl ChangesComponent { } /// - pub fn is_file_seleted(&self) -> bool { - self.files.is_file_seleted() + pub fn is_file_selected(&self) -> bool { + self.files.is_file_selected() } fn index_add_remove(&mut self) -> Result { diff --git a/src/components/commit_details/details.rs b/src/components/commit_details/details.rs index 95e4737e..986a1af2 100644 --- a/src/components/commit_details/details.rs +++ b/src/components/commit_details/details.rs @@ -184,7 +184,7 @@ impl DetailsComponent { if let Some(ref committer) = data.committer { res.extend(vec![ Line::from(vec![ - style_detail(&self.theme, &Detail::Commiter), + style_detail(&self.theme, &Detail::Committer), Span::styled( Cow::from(format!( "{} <{}>", diff --git a/src/components/commit_details/style.rs b/src/components/commit_details/style.rs index 5082497c..7a077594 100644 --- a/src/components/commit_details/style.rs +++ b/src/components/commit_details/style.rs @@ -5,7 +5,7 @@ use std::borrow::Cow; pub enum Detail { Author, Date, - Commiter, + Committer, Sha, Message, } @@ -23,7 +23,7 @@ pub fn style_detail<'a>( Cow::from(strings::commit::details_date()), theme.text(false, false), ), - Detail::Commiter => Span::styled( + Detail::Committer => Span::styled( Cow::from(strings::commit::details_committer()), theme.text(false, false), ), diff --git a/src/components/status_tree.rs b/src/components/status_tree.rs index 8aa58ce7..af0cde79 100644 --- a/src/components/status_tree.rs +++ b/src/components/status_tree.rs @@ -119,7 +119,7 @@ impl StatusTreeComponent { } /// - pub fn is_file_seleted(&self) -> bool { + pub fn is_file_selected(&self) -> bool { self.tree.selected_item().map_or(false, |item| { match item.kind { FileTreeItemKind::File(_) => true, diff --git a/src/components/utils/logitems.rs b/src/components/utils/logitems.rs index 73f7fffd..4534f225 100644 --- a/src/components/utils/logitems.rs +++ b/src/components/utils/logitems.rs @@ -109,7 +109,7 @@ impl ItemBatch { self.items.iter() } - /// clear curent list of items + /// clear current list of items pub fn clear(&mut self) { self.items.clear(); self.index_offset = None; diff --git a/src/components/utils/mod.rs b/src/components/utils/mod.rs index 7d32a40f..54298d7a 100644 --- a/src/components/utils/mod.rs +++ b/src/components/utils/mod.rs @@ -26,7 +26,7 @@ macro_rules! try_or_popup { }; } -/// helper func to convert unix time since epoch to formated time string in local timezone +/// helper func to convert unix time since epoch to formatted time string in local timezone pub fn time_to_string(secs: i64, short: bool) -> String { let time = DateTime::::from( DateTime::::from_naive_utc_and_offset( diff --git a/src/components/utils/statustree.rs b/src/components/utils/statustree.rs index 92595843..4b3384d7 100644 --- a/src/components/utils/statustree.rs +++ b/src/components/utils/statustree.rs @@ -444,7 +444,7 @@ mod tests { .collect::>() } - fn get_visibles(tree: &StatusTree) -> Vec { + fn get_visible(tree: &StatusTree) -> Vec { tree.tree .items() .iter() @@ -503,7 +503,7 @@ mod tests { res.update(&string_vec_to_status(&["a/b"])).unwrap(); assert_eq!( - get_visibles(&res), + get_visible(&res), vec![ true, // false, // @@ -533,7 +533,7 @@ mod tests { ); assert_eq!( - get_visibles(&res), + get_visible(&res), vec![ true, // false, // @@ -554,7 +554,7 @@ mod tests { ); assert_eq!( - get_visibles(&res), + get_visible(&res), vec![ true, // false, // @@ -581,10 +581,10 @@ mod tests { res.collapse(&String::from("a/b"), 1); - let visibles = get_visibles(&res); + let visible = get_visible(&res); assert_eq!( - visibles, + visible, vec![ true, // true, // @@ -595,10 +595,10 @@ mod tests { res.expand(&String::from("a/b"), 1); - let visibles = get_visibles(&res); + let visible = get_visible(&res); assert_eq!( - visibles, + visible, vec![ true, // true, // @@ -628,7 +628,7 @@ mod tests { res.collapse(&String::from("a"), 0); assert_eq!( - get_visibles(&res), + get_visible(&res), vec![ true, // false, // @@ -641,7 +641,7 @@ mod tests { res.expand(&String::from("a"), 0); assert_eq!( - get_visibles(&res), + get_visible(&res), vec![ true, // true, // @@ -669,10 +669,10 @@ mod tests { res.collapse(&String::from("a"), 0); - let visibles = get_visibles(&res); + let visible = get_visible(&res); assert_eq!( - visibles, + visible, vec![ true, // false, // @@ -699,10 +699,10 @@ mod tests { res.collapse(&String::from("a/b"), 1); - let visibles = get_visibles(&res); + let visible = get_visible(&res); assert_eq!( - visibles, + visible, vec![ true, // true, // @@ -713,10 +713,10 @@ mod tests { res.collapse(&String::from("a"), 0); - let visibles = get_visibles(&res); + let visible = get_visible(&res); assert_eq!( - visibles, + visible, vec![ true, // false, // @@ -727,10 +727,10 @@ mod tests { res.expand(&String::from("a"), 0); - let visibles = get_visibles(&res); + let visible = get_visible(&res); assert_eq!( - visibles, + visible, vec![ true, // true, // diff --git a/src/keys/key_list.rs b/src/keys/key_list.rs index b6e9c328..71e6756d 100644 --- a/src/keys/key_list.rs +++ b/src/keys/key_list.rs @@ -85,8 +85,8 @@ pub struct KeysList { pub log_tag_commit: GituiKeyEvent, pub log_mark_commit: GituiKeyEvent, pub log_checkout_commit: GituiKeyEvent, - pub log_reset_comit: GituiKeyEvent, - pub log_reword_comit: GituiKeyEvent, + pub log_reset_commit: GituiKeyEvent, + pub log_reword_commit: GituiKeyEvent, pub log_find: GituiKeyEvent, pub find_commit_sha: GituiKeyEvent, pub commit_amend: GituiKeyEvent, @@ -176,8 +176,8 @@ impl Default for KeysList { log_tag_commit: GituiKeyEvent::new(KeyCode::Char('t'), KeyModifiers::empty()), log_mark_commit: GituiKeyEvent::new(KeyCode::Char(' '), KeyModifiers::empty()), log_checkout_commit: GituiKeyEvent { code: KeyCode::Char('S'), modifiers: KeyModifiers::SHIFT }, - log_reset_comit: GituiKeyEvent { code: KeyCode::Char('R'), modifiers: KeyModifiers::SHIFT }, - log_reword_comit: GituiKeyEvent { code: KeyCode::Char('r'), modifiers: KeyModifiers::empty() }, + log_reset_commit: GituiKeyEvent { code: KeyCode::Char('R'), modifiers: KeyModifiers::SHIFT }, + log_reword_commit: GituiKeyEvent { code: KeyCode::Char('r'), modifiers: KeyModifiers::empty() }, log_find: GituiKeyEvent { code: KeyCode::Char('f'), modifiers: KeyModifiers::empty() }, find_commit_sha: GituiKeyEvent::new(KeyCode::Char('j'), KeyModifiers::CONTROL), commit_amend: GituiKeyEvent::new(KeyCode::Char('a'), KeyModifiers::CONTROL), diff --git a/src/options.rs b/src/options.rs index 87f92aeb..db048020 100644 --- a/src/options.rs +++ b/src/options.rs @@ -24,7 +24,7 @@ struct OptionsData { pub commit_msgs: Vec, } -const COMMIT_MSG_HISTRY_LENGTH: usize = 20; +const COMMIT_MSG_HISTORY_LENGTH: usize = 20; #[derive(Clone)] pub struct Options { @@ -109,7 +109,8 @@ impl Options { pub fn add_commit_msg(&mut self, msg: &str) { self.data.commit_msgs.push(msg.to_owned()); - while self.data.commit_msgs.len() > COMMIT_MSG_HISTRY_LENGTH { + while self.data.commit_msgs.len() > COMMIT_MSG_HISTORY_LENGTH + { self.data.commit_msgs.remove(0); } self.save(); diff --git a/src/popups/commit.rs b/src/popups/commit.rs index 7385c004..2511d8b8 100644 --- a/src/popups/commit.rs +++ b/src/popups/commit.rs @@ -36,7 +36,7 @@ use std::{ use super::ExternalEditorPopup; enum CommitResult { - ComitDone, + CommitDone, Aborted, } @@ -172,7 +172,7 @@ impl CommitPopup { .as_bytes(), )?; - file.write_all(b"\n#\n# Changes to be commited:")?; + file.write_all(b"\n#\n# Changes to be committed:")?; for change in changes { let status_char = @@ -218,7 +218,7 @@ impl CommitPopup { if matches!( self.commit_with_msg(msg)?, - CommitResult::ComitDone + CommitResult::CommitDone ) { self.options .borrow_mut() @@ -279,7 +279,7 @@ impl CommitPopup { ))); } - Ok(CommitResult::ComitDone) + Ok(CommitResult::CommitDone) } fn do_commit(&self, msg: &str) -> Result<()> { diff --git a/src/popups/fuzzy_find.rs b/src/popups/fuzzy_find.rs index ccee1b9c..507b64e1 100644 --- a/src/popups/fuzzy_find.rs +++ b/src/popups/fuzzy_find.rs @@ -187,7 +187,7 @@ impl FuzzyFindPopup { .iter() .skip(scroll_skip) .take(height) - .map(|(idx, indicies)| { + .map(|(idx, indices)| { let selected = self .selected_index .map_or(false, |index| index == *idx); @@ -205,7 +205,7 @@ impl FuzzyFindPopup { Cow::from(c.to_string()), self.theme.text( selected, - indicies.contains( + indices.contains( &(c_idx + trim_length), ), ), diff --git a/src/popups/log_search.rs b/src/popups/log_search.rs index e7e868ad..2513d7ec 100644 --- a/src/popups/log_search.rs +++ b/src/popups/log_search.rs @@ -245,7 +245,7 @@ impl LogSearchPopupPopup { ), )]), Line::from(vec![Span::styled( - format!("[{x_files}] commited files",), + format!("[{x_files}] committed files",), self.theme.text( matches!( self.selection, diff --git a/src/popups/submodules.rs b/src/popups/submodules.rs index 8a758a49..5a6fa122 100644 --- a/src/popups/submodules.rs +++ b/src/popups/submodules.rs @@ -318,10 +318,10 @@ impl SubmodulesListPopup { fn set_selection(&mut self, selection: u16) -> Result<()> { let num_entriess: u16 = self.submodules.len().try_into()?; - let num_entriess = num_entriess.saturating_sub(1); + let num_entries = num_entriess.saturating_sub(1); - let selection = if selection > num_entriess { - num_entriess + let selection = if selection > num_entries { + num_entries } else { selection }; diff --git a/src/popups/taglist.rs b/src/popups/taglist.rs index ce3da32c..bc902c26 100644 --- a/src/popups/taglist.rs +++ b/src/popups/taglist.rs @@ -83,7 +83,7 @@ impl DrawableComponent for TagListPopup { Constraint::Length(10), // author width Constraint::Length(19), - // attachement + // attachment Constraint::Length(1), // commit id Constraint::Percentage(100), @@ -443,7 +443,7 @@ impl TagListPopup { /// fn get_row(&self, tag: &TagWithMetadata) -> Row { const UPSTREAM_SYMBOL: &str = "\u{2191}"; - const ATTACHEMENT_SYMBOL: &str = "@"; + const ATTACHMENT_SYMBOL: &str = "@"; const EMPTY_SYMBOL: &str = " "; let is_tag_missing_on_remote = self @@ -462,7 +462,7 @@ impl TagListPopup { }; let has_attachement_str = if tag.annotation.is_some() { - ATTACHEMENT_SYMBOL + ATTACHMENT_SYMBOL } else { EMPTY_SYMBOL }; diff --git a/src/strings.rs b/src/strings.rs index 0fc19c10..a369a869 100644 --- a/src/strings.rs +++ b/src/strings.rs @@ -1356,7 +1356,7 @@ pub mod commands { CommandText::new( format!( "Reset [{}]", - key_config.get_hint(key_config.keys.log_reset_comit), + key_config.get_hint(key_config.keys.log_reset_commit), ), "reset to commit", CMD_GROUP_LOG, @@ -1368,7 +1368,8 @@ pub mod commands { CommandText::new( format!( "Reword [{}]", - key_config.get_hint(key_config.keys.log_reword_comit), + key_config + .get_hint(key_config.keys.log_reword_commit), ), "reword commit message", CMD_GROUP_LOG, diff --git a/src/tabs/revlog.rs b/src/tabs/revlog.rs index 41694862..524550dd 100644 --- a/src/tabs/revlog.rs +++ b/src/tabs/revlog.rs @@ -542,7 +542,7 @@ impl Component for Revlog { return Ok(EventState::Consumed); } else if key_match( k, - self.key_config.keys.log_reset_comit, + self.key_config.keys.log_reset_commit, ) && !self.is_search_pending() { return self.selected_commit().map_or( @@ -556,7 +556,7 @@ impl Component for Revlog { ); } else if key_match( k, - self.key_config.keys.log_reword_comit, + self.key_config.keys.log_reword_commit, ) && !self.is_search_pending() { return self.selected_commit().map_or( diff --git a/src/tabs/status.rs b/src/tabs/status.rs index 47548565..67605f8e 100644 --- a/src/tabs/status.rs +++ b/src/tabs/status.rs @@ -311,8 +311,8 @@ impl Status { fn can_focus_diff(&self) -> bool { match self.focus { - Focus::WorkDir => self.index_wd.is_file_seleted(), - Focus::Stage => self.index.is_file_seleted(), + Focus::WorkDir => self.index_wd.is_file_selected(), + Focus::Stage => self.index.is_file_selected(), Focus::Diff => false, } } diff --git a/src/ui/reflow.rs b/src/ui/reflow.rs index 028d9b21..8b9c3cde 100644 --- a/src/ui/reflow.rs +++ b/src/ui/reflow.rs @@ -144,7 +144,7 @@ pub struct LineTruncator<'a, 'b> { symbols: &'b mut dyn Iterator>, max_line_width: u16, current_line: Vec>, - /// Record the offet to skip render + /// Record the offset to skip render horizontal_offset: u16, } @@ -509,7 +509,7 @@ mod test { assert_eq!(line_truncator, vec![" "]); } - /// Tests an input starting with a letter, folowed by spaces - some of the behaviour is + /// Tests an input starting with a letter, followed by spaces - some of the behaviour is /// incidental. #[test] fn line_composer_char_plus_lots_of_spaces() { diff --git a/typos.toml b/typos.toml index e69de29b..0ae83ad4 100644 --- a/typos.toml +++ b/typos.toml @@ -0,0 +1,8 @@ +# configuration for https://github.com/crate-ci/typos + +[default.extend-words] +ratatui = "ratatui" +syntact = "syntact" + +[files] +extend-exclude = ["CHANGELOG.md"] diff --git a/wix/main.wxs b/wix/main.wxs index 61ecda29..e61978ad 100644 --- a/wix/main.wxs +++ b/wix/main.wxs @@ -175,7 +175,7 @@