From 67dd733f00db484bd09251807ab27dc7052c57c1 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 16 Mar 2007 21:58:20 +0000 Subject: Added "case" to fix for bug #1681928. --- src/LexMSSQL.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/LexMSSQL.cxx b/src/LexMSSQL.cxx index c5d38c31f..5f5a562ad 100644 --- a/src/LexMSSQL.cxx +++ b/src/LexMSSQL.cxx @@ -307,19 +307,19 @@ static void FoldMSSQLDoc(unsigned int startPos, int length, int, WordList *[], A inComment = (style == SCE_MSSQL_COMMENT); } if (style == SCE_MSSQL_STATEMENT) { - // Folding between begin and end - if (ch == 'b' || ch == 'e' || ch=='B' || ch=='E') { + // Folding between begin or case and end + if (ch == 'b' || ch == 'B' || ch == 'c' || ch == 'C' || ch == 'e' || ch == 'E') { for (unsigned int j = 0; j < 5; j++) { if (!iswordchar(styler[i + j])) { break; } - s[j] = styler[i + j]; + s[j] = static_cast(tolower(styler[i + j])); s[j + 1] = '\0'; } - if (CompareCaseInsensitive(s, "begin") == 0) { + if ((strcmp(s, "begin") == 0) || (strcmp(s, "case") == 0)) { levelCurrent++; } - if (CompareCaseInsensitive(s, "end") == 0) { + if (strcmp(s, "end") == 0) { levelCurrent--; } } -- cgit v1.2.3