Skip to content

Commit f7aa215

Browse files
authored
Update TextEditor.cpp
Fixed an error where all text would be detected as a multi-line comment if no start and end strings were defined. Not all languages have multi-line comments, so this is a necessary fix.
1 parent 0a88824 commit f7aa215

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

TextEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2335,7 +2335,7 @@ void TextEditor::ColorizeInternal()
23352335
{
23362336
withinSingleLineComment = true;
23372337
}
2338-
else if (!withinSingleLineComment && currentIndex + startStr.size() <= line.size() &&
2338+
else if (startStr.size() != 0 && !withinSingleLineComment && currentIndex + startStr.size() <= line.size() &&
23392339
equals(startStr.begin(), startStr.end(), from, from + startStr.size(), pred))
23402340
{
23412341
commentStartLine = currentLine;

0 commit comments

Comments
 (0)