diff --git a/src/cursor.rs b/src/cursor.rs index 6c52530..3399f7b 100644 --- a/src/cursor.rs +++ b/src/cursor.rs @@ -249,7 +249,7 @@ impl CursorMove { let row = row.checked_sub(1)?; Some((row, fit_col(col, &lines[row]))) } - Down => (Some((row + 1, fit_col(col, lines.get(row + 1)?)))), + Down => Some((row + 1, fit_col(col, lines.get(row + 1)?))), Head => Some((row, 0)), End => Some((row, lines[row].chars().count())), Top => Some((0, fit_col(col, &lines[0]))), diff --git a/src/widget.rs b/src/widget.rs index 85150e1..a26a219 100644 --- a/src/widget.rs +++ b/src/widget.rs @@ -116,7 +116,9 @@ impl<'a> Widget for Renderer<'a> { let top_col = next_scroll_top(top_col, cursor.1 as u16, width); let text = self.text(top_row as usize, height as usize); - let mut inner = Paragraph::new(text).style(self.0.style()).alignment(self.0.alignment()); + let mut inner = Paragraph::new(text) + .style(self.0.style()) + .alignment(self.0.alignment()); if let Some(b) = self.0.block() { inner = inner.block(b.clone()); }