diff --git a/scintilla/lexers/LexBatch.cxx b/scintilla/lexers/LexBatch.cxx index db7e37688..9004484f1 100644 --- a/scintilla/lexers/LexBatch.cxx +++ b/scintilla/lexers/LexBatch.cxx @@ -47,7 +47,7 @@ static bool IsBOperator(char ch) { // Tests for BATCH Separators static bool IsBSeparator(char ch) { return (ch == '\\') || (ch == '.') || (ch == ';') || - (ch == '\"') || (ch == '\'') || (ch == '/'); + (ch == '\"') || (ch == '\'') || (ch == '/') || (ch == '&') || (ch == '|'); } static void ColouriseBatchLine( @@ -131,9 +131,8 @@ static void ColouriseBatchLine( } wordBuffer[wbl] = '\0'; wbo = 0; - // Check for Comment - return if found - if (CompareCaseInsensitive(wordBuffer, "rem") == 0) { + if ((CompareCaseInsensitive(wordBuffer, "rem") == 0) && (continueProcessing)) { styler.ColourTo(endPos, SCE_BAT_COMMENT); return; } @@ -141,9 +140,9 @@ static void ColouriseBatchLine( if (IsBSeparator(wordBuffer[0])) { // Check for External Command / Program if ((cmdLoc == offset - wbl) && - ((wordBuffer[0] == ':') || - (wordBuffer[0] == '\\') || - (wordBuffer[0] == '.'))) { + ((wordBuffer[0] == ':') || + (wordBuffer[0] == '\\') || + (wordBuffer[0] == '.'))) { // Reset Offset to re-process remainder of word offset -= (wbl - 1); // Colorize External Command / Program @@ -163,8 +162,7 @@ static void ColouriseBatchLine( styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT); } // Check for Regular Keyword in list - } else if ((keywords.InList(wordBuffer)) && - (continueProcessing)) { + } else if ((keywords.InList(wordBuffer)) && (continueProcessing)) { // ECHO, GOTO, PROMPT and SET require no further Regular Keyword Checking if ((CompareCaseInsensitive(wordBuffer, "echo") == 0) || (CompareCaseInsensitive(wordBuffer, "goto") == 0) || @@ -211,8 +209,7 @@ static void ColouriseBatchLine( // Check for Special Keyword in list, External Command / Program, or Default Text } else if ((wordBuffer[0] != '%') && (wordBuffer[0] != '!') && - (!IsBOperator(wordBuffer[0])) && - (continueProcessing)) { + (!IsBOperator(wordBuffer[0])) && (continueProcessing)) { // Check for Special Keyword // Affected Commands are in Length range 2-6 // Good that ERRORLEVEL, EXIST, CALL, DO, LOADHIGH, and LH are unaffected @@ -454,6 +451,7 @@ static void ColouriseBatchLine( while ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) { offset++; } + } // Colorize Default Text for remainder of line - currently not lexed styler.ColourTo(endPos, SCE_BAT_DEFAULT); diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx index aff4927b1..2a9b0ae95 100644 --- a/scintilla/src/Editor.cxx +++ b/scintilla/src/Editor.cxx @@ -6606,8 +6606,8 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return view.posCache.GetSize(); case SCI_SETSCROLLWIDTH: - PLATFORM_ASSERT(wParam >= 0); - if ((wParam >= 0) && (wParam != static_cast(scrollWidth))) { + PLATFORM_ASSERT(wParam > 0); + if ((wParam > 0) && (wParam != static_cast(scrollWidth))) { view.lineWidthMaxSeen = 0; scrollWidth = static_cast(wParam); SetScrollBars(); diff --git a/src/Version.h b/src/Version.h index c5c3425a3..e35f1bee7 100644 Binary files a/src/Version.h and b/src/Version.h differ