From f4b21d2cf17981e94c03c263fad612977541d287 Mon Sep 17 00:00:00 2001 From: Junhyeok Jang <89117160+kennethjang34@users.noreply.github.com> Date: Sun, 25 Dec 2022 15:54:56 -0800 Subject: [PATCH] fix highlighting bug with multi-line comments --- src/row.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/row.rs b/src/row.rs index 0564d13..cea24b3 100644 --- a/src/row.rs +++ b/src/row.rs @@ -415,10 +415,12 @@ impl Row { if let Some(hl_type) = self.highlighting.last() { if *hl_type == highlighting::Type::MultilineComment && self.string.len() > 1 - && self.string[self.string.len() - 2..] == *"*/" + && self.string[self.string.len() - 2..] != *"*/" { return true; } + } else if start_with_comment { + return true; } return false; }