Fix formatting of some long lines
This commit is contained in:
parent
cd7ff3b6e5
commit
2790fb46f4
@ -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();
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user