From a1fe32c4ae5d9b6ee594dac6d3a2fd740c4e85c3 Mon Sep 17 00:00:00 2001 From: crackedmind Date: Sat, 6 Mar 2021 10:09:42 +0500 Subject: [PATCH] code cleanup --- vcreatorhighlighter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vcreatorhighlighter.cpp b/vcreatorhighlighter.cpp index bb789c6..0e85c22 100644 --- a/vcreatorhighlighter.cpp +++ b/vcreatorhighlighter.cpp @@ -38,12 +38,11 @@ void VlangHighlighter::highlightBlock(const QString &text) QRegularExpression re(R"del((\$([\w.]+|\{.*?\})))del"); QString t = text.mid(token.offset, token.length); auto it = re.globalMatch(t); - int matches = 0; + setFormat(token.offset, token.length, formatForCategory(TextEditor::C_STRING)); while(it.hasNext()) { auto match = it.next(); setFormat(token.offset + match.capturedStart(1), match.capturedEnd(1) - match.capturedStart(1), formatForCategory(TextEditor::C_TYPE)); - matches++; } } break;