aboutsummaryrefslogtreecommitdiff
path: root/helix-tui
diff options
context:
space:
mode:
authorchunghha2022-04-27 19:21:20 +0000
committerGitHub2022-04-27 19:21:20 +0000
commit3a398eec56c907f9d0f166e77242eb13ded229bc (patch)
tree4411668f181c0a1ae31b6599a50c196bccd709e6 /helix-tui
parent2e46961886cb40b45a03a91c59823b0e437a9867 (diff)
fix typos (#2304)
Diffstat (limited to 'helix-tui')
-rw-r--r--helix-tui/src/buffer.rs6
-rw-r--r--helix-tui/src/widgets/reflow.rs4
-rw-r--r--helix-tui/src/widgets/table.rs4
-rw-r--r--helix-tui/tests/terminal.rs8
4 files changed, 11 insertions, 11 deletions
diff --git a/helix-tui/src/buffer.rs b/helix-tui/src/buffer.rs
index 22956b04..21c53aad 100644
--- a/helix-tui/src/buffer.rs
+++ b/helix-tui/src/buffer.rs
@@ -322,7 +322,7 @@ impl Buffer {
continue;
}
// `x_offset + width > max_offset` could be integer overflow on 32-bit machines if we
- // change dimenstions to usize or u32 and someone resizes the terminal to 1x2^32.
+ // change dimensions to usize or u32 and someone resizes the terminal to 1x2^32.
if width > max_offset.saturating_sub(x_offset) {
break;
}
@@ -563,9 +563,9 @@ impl Buffer {
let width = self.area.width;
let mut updates: Vec<(u16, u16, &Cell)> = vec![];
- // Cells invalidated by drawing/replacing preceeding multi-width characters:
+ // Cells invalidated by drawing/replacing preceding multi-width characters:
let mut invalidated: usize = 0;
- // Cells from the current buffer to skip due to preceeding multi-width characters taking their
+ // Cells from the current buffer to skip due to preceding multi-width characters taking their
// place (the skipped cells should be blank anyway):
let mut to_skip: usize = 0;
for (i, (current, previous)) in next_buffer.iter().zip(previous_buffer.iter()).enumerate() {
diff --git a/helix-tui/src/widgets/reflow.rs b/helix-tui/src/widgets/reflow.rs
index 38071940..c30aa6e0 100644
--- a/helix-tui/src/widgets/reflow.rs
+++ b/helix-tui/src/widgets/reflow.rs
@@ -128,7 +128,7 @@ pub struct LineTruncator<'a, 'b> {
symbols: &'b mut dyn Iterator<Item = StyledGrapheme<'a>>,
max_line_width: u16,
current_line: Vec<StyledGrapheme<'a>>,
- /// Record the offet to skip render
+ /// Record the offset to skip render
horizontal_offset: u16,
}
@@ -439,7 +439,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/helix-tui/src/widgets/table.rs b/helix-tui/src/widgets/table.rs
index 6aee5988..eb03704e 100644
--- a/helix-tui/src/widgets/table.rs
+++ b/helix-tui/src/widgets/table.rs
@@ -68,7 +68,7 @@ where
/// Row::new(vec!["Cell1", "Cell2", "Cell3"]);
/// ```
///
-/// But if you need a bit more control over individual cells, you can explicity create [`Cell`]s:
+/// But if you need a bit more control over individual cells, you can explicitly create [`Cell`]s:
/// ```rust
/// # use helix_tui::widgets::{Row, Cell};
/// # use helix_view::graphics::{Style, Color};
@@ -109,7 +109,7 @@ impl<'a> Row<'a> {
self
}
- /// Set the [`Style`] of the entire row. This [`Style`] can be overriden by the [`Style`] of a
+ /// Set the [`Style`] of the entire row. This [`Style`] can be overridden by the [`Style`] of a
/// any individual [`Cell`] or event by their [`Text`] content.
pub fn style(mut self, style: Style) -> Self {
self.style = style;
diff --git a/helix-tui/tests/terminal.rs b/helix-tui/tests/terminal.rs
index 3e1c19e3..3dd3b0b0 100644
--- a/helix-tui/tests/terminal.rs
+++ b/helix-tui/tests/terminal.rs
@@ -17,15 +17,15 @@ fn terminal_buffer_size_should_be_limited() {
// let backend = TestBackend::new(10, 10);
// let mut terminal = Terminal::new(backend)?;
// let frame = terminal.draw(|f| {
-// let paragrah = Paragraph::new("Test");
-// f.render_widget(paragrah, f.size());
+// let paragraph = Paragraph::new("Test");
+// f.render_widget(paragraph, f.size());
// })?;
// assert_eq!(frame.buffer.get(0, 0).symbol, "T");
// assert_eq!(frame.area, Rect::new(0, 0, 10, 10));
// terminal.backend_mut().resize(8, 8);
// let frame = terminal.draw(|f| {
-// let paragrah = Paragraph::new("test");
-// f.render_widget(paragrah, f.size());
+// let paragraph = Paragraph::new("test");
+// f.render_widget(paragraph, f.size());
// })?;
// assert_eq!(frame.buffer.get(0, 0).symbol, "t");
// assert_eq!(frame.area, Rect::new(0, 0, 8, 8));