Fix formatting of some long lines

This commit is contained in:
Timothy Warren 2021-03-16 14:31:22 -04:00
parent cd7ff3b6e5
commit 2790fb46f4
2 changed files with 8 additions and 3 deletions

View File

@ -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();

View File

@ -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;
}
}