From 2790fb46f445765e224aa96dc98e16499c4a44e6 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Tue, 16 Mar 2021 14:31:22 -0400 Subject: [PATCH] Fix formatting of some long lines --- src/editor.rs | 6 ++++-- src/row.rs | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/editor.rs b/src/editor.rs index bcb0641..910f93d 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -111,8 +111,10 @@ impl Editor { self.document.highlight( &self.highlighted_word, Some( - self.offset.y.saturating_add(self.terminal.size().height as usize), - ) + self.offset + .y + .saturating_add(self.terminal.size().height as usize), + ), ); self.draw_rows(); self.draw_status_bar(); diff --git a/src/row.rs b/src/row.rs index 0bafd66..32622e2 100644 --- a/src/row.rs +++ b/src/row.rs @@ -465,7 +465,10 @@ impl Row { if self.is_highlighted && word.is_none() { if let Some(hl_type) = self.highlighting.last() { - if *hl_type == highlighting::Type::MultilineComment && self.string.len() > 1 && self.string[self.string.len() - 2..] == *"*/" { + if *hl_type == highlighting::Type::MultilineComment + && self.string.len() > 1 + && self.string[self.string.len() - 2..] == *"*/" + { return true; } }