diff --git a/scintilla/lexers/LexBatch.cxx b/scintilla/lexers/LexBatch.cxx index 282eb1e563..ac91792580 100644 --- a/scintilla/lexers/LexBatch.cxx +++ b/scintilla/lexers/LexBatch.cxx @@ -410,8 +410,8 @@ void ColouriseBatchDoc(Sci_PositionU startPos, Sci_Position length, int initStyl } } else if (sc.ch == '^' || sc.ch == '%' || sc.ch == '!') { const bool begin = logicalVisibleChars == sc.LengthCurrent(); - const bool handled = (sc.ch == '^') ? DetectBatchVariable(sc, outerStyle, varQuoteChar, parenCount) - : DetectBatchEscapeChar(sc, outerStyle, command); + const bool handled = (sc.ch == '^') ? DetectBatchEscapeChar(sc, outerStyle, command) + : DetectBatchVariable(sc, outerStyle, varQuoteChar, parenCount); if (handled) { if (begin && command == Command::None) { command = Command::Argument;