Skip to content

Commit e0aa40a

Browse files
Fix typos and grammar mistakes (#743)
* Fix typos and grammar mistakes * Fix broken test for "remove_last_char_works_with_normal_string" I accidentally "fixed" the missing char in the previous commit.
1 parent 62fdea8 commit e0aa40a

File tree

11 files changed

+16
-16
lines changed

11 files changed

+16
-16
lines changed

src/completion/history.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const SELECTION_CHAR: char = '!';
1111
// It pulls data from the object that contains access to the History
1212
pub(crate) struct HistoryCompleter<'menu>(&'menu dyn History);
1313

14-
// Safe to implement Send since the Historycompleter should only be used when
14+
// Safe to implement Send since the HistoryCompleter should only be used when
1515
// updating the menu and that must happen in the same thread
1616
unsafe impl<'menu> Send for HistoryCompleter<'menu> {}
1717

src/core_editor/editor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ mod test {
667667
#[rstest]
668668
#[case("hello world", 0, 'l', 1, false, "lo world")]
669669
#[case("hello world", 0, 'l', 1, true, "llo world")]
670-
#[ignore = "Deleting two consecutives is not implemented correctly and needs the multiplier explicitly."]
670+
#[ignore = "Deleting two consecutive chars is not implemented correctly and needs the multiplier explicitly."]
671671
#[case("hello world", 0, 'l', 2, false, "o world")]
672672
#[case("hello world", 0, 'h', 1, false, "hello world")]
673673
#[case("hello world", 0, 'l', 3, true, "ld")]

src/core_editor/line_buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ mod test {
908908
#[case("word and another one", 3, 7)] // repeat calling will move
909909
#[case("word and another one", 4, 7)] // Starting from whitespace works
910910
#[case("word\nline two", 0, 3)] // Multiline...
911-
#[case("word\nline two", 3, 8)] // ... contineus to next word end
911+
#[case("word\nline two", 3, 8)] // ... continues to next word end
912912
#[case("weirdö characters", 0, 5)] // Multibyte unicode at the word end (latin UTF-8 should be two bytes long)
913913
#[case("weirdö characters", 5, 17)] // continue with unicode (latin UTF-8 should be two bytes long)
914914
#[case("weirdö", 0, 5)] // Multibyte unicode at the buffer end is fine as well

src/edit_mode/keybindings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl Keybindings {
6767

6868
/// Remove a keybinding
6969
///
70-
/// Returns `Some(ReedlineEvent)` if the keycombination was previously bound to a particular [`ReedlineEvent`]
70+
/// Returns `Some(ReedlineEvent)` if the key combination was previously bound to a particular [`ReedlineEvent`]
7171
pub fn remove_binding(
7272
&mut self,
7373
modifier: KeyModifiers,

src/engine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ impl Reedline {
657657
Ok(())
658658
}
659659

660-
/// Clear the screen and the scollback buffer of the terminal
660+
/// Clear the screen and the scrollback buffer of the terminal
661661
pub fn clear_scrollback(&mut self) -> Result<()> {
662662
self.painter.clear_scrollback()?;
663663

src/external_printer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ where
5555
self.sender.send(line)
5656
}
5757

58-
/// Convenience method to get a line if any, doesn´t block.
58+
/// Convenience method to get a line if any, doesn't block.
5959
pub fn get_line(&self) -> Option<T> {
6060
self.receiver.try_recv().ok()
6161
}

src/highlighter/example.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ use nu_ansi_term::{Color, Style};
44

55
pub static DEFAULT_BUFFER_MATCH_COLOR: Color = Color::Green;
66
pub static DEFAULT_BUFFER_NEUTRAL_COLOR: Color = Color::White;
7-
pub static DEFAULT_BUFFER_NOTMATCH_COLOR: Color = Color::Red;
7+
pub static DEFAULT_BUFFER_NOT_MATCH_COLOR: Color = Color::Red;
88

99
/// A simple, example highlighter that shows how to highlight keywords
1010
pub struct ExampleHighlighter {
1111
external_commands: Vec<String>,
1212
match_color: Color,
13-
notmatch_color: Color,
13+
not_match_color: Color,
1414
neutral_color: Color,
1515
}
1616

@@ -51,7 +51,7 @@ impl Highlighter for ExampleHighlighter {
5151
} else if self.external_commands.is_empty() {
5252
styled_text.push((Style::new().fg(self.neutral_color), line.to_string()));
5353
} else {
54-
styled_text.push((Style::new().fg(self.notmatch_color), line.to_string()));
54+
styled_text.push((Style::new().fg(self.not_match_color), line.to_string()));
5555
}
5656

5757
styled_text
@@ -63,7 +63,7 @@ impl ExampleHighlighter {
6363
ExampleHighlighter {
6464
external_commands,
6565
match_color: DEFAULT_BUFFER_MATCH_COLOR,
66-
notmatch_color: DEFAULT_BUFFER_NOTMATCH_COLOR,
66+
not_match_color: DEFAULT_BUFFER_NOT_MATCH_COLOR,
6767
neutral_color: DEFAULT_BUFFER_NEUTRAL_COLOR,
6868
}
6969
}
@@ -76,7 +76,7 @@ impl ExampleHighlighter {
7676
neutral_color: Color,
7777
) {
7878
self.match_color = match_color;
79-
self.notmatch_color = notmatch_color;
79+
self.not_match_color = notmatch_color;
8080
self.neutral_color = neutral_color;
8181
}
8282
}

src/history/cursor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ mod tests {
510510
}
511511

512512
#[test]
513-
fn concurrent_histories_dont_erase_eachother() -> Result<()> {
513+
fn concurrent_histories_do_not_erase_each_other() -> Result<()> {
514514
use tempfile::tempdir;
515515

516516
let tmp = tempdir().unwrap();

src/menu/ide_menu.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ impl Menu for IdeMenu {
893893
));
894894
}
895895

896-
let decsription_height =
896+
let description_height =
897897
available_lines.min(self.default_details.max_description_height);
898898
let description_lines = self
899899
.get_value()
@@ -903,7 +903,7 @@ impl Menu for IdeMenu {
903903
description,
904904
use_ansi_coloring,
905905
self.working_details.description_width,
906-
decsription_height,
906+
description_height,
907907
self.working_details.description_width, // the width has already been calculated
908908
)
909909
})

src/painting/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub(crate) fn estimate_required_lines(input: &str, screen_width: u16) -> usize {
5151

5252
/// Reports the additional lines needed due to wrapping for the given line.
5353
///
54-
/// Does not account for any potential linebreaks in `line`
54+
/// Does not account for any potential line breaks in `line`
5555
///
5656
/// If `line` fits in `terminal_columns` returns 0
5757
pub(crate) fn estimate_single_line_wraps(line: &str, terminal_columns: u16) -> usize {

0 commit comments

Comments
 (0)