summaryrefslogtreecommitdiffstats
path: root/scintilla/lexers/LexSQL.cxx
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2011-03-22 10:34:38 +0000
committerXhmikosR <xhmikosr@users.sourceforge.net>2011-03-22 10:34:38 +0000
commit1e73d29b7c68979b77dc9442d999472e60afa545 (patch)
tree6fb76d537e1b9fc98da5e62c24b670c3dec873d1 /scintilla/lexers/LexSQL.cxx
parent740e4a0f3a4ff64ca7953f027b688407b71cffd3 (diff)
downloadnotepad2-mod-1e73d29b7c68979b77dc9442d999472e60afa545.zip
notepad2-mod-1e73d29b7c68979b77dc9442d999472e60afa545.tar.gz
notepad2-mod-1e73d29b7c68979b77dc9442d999472e60afa545.tar.bz2
update Scintilla
git-svn-id: https://notepad2-mod.googlecode.com/svn/trunk@446 28bd50df-7adb-d945-0439-6e466c6a13cc
Diffstat (limited to 'scintilla/lexers/LexSQL.cxx')
-rw-r--r--scintilla/lexers/LexSQL.cxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/scintilla/lexers/LexSQL.cxx b/scintilla/lexers/LexSQL.cxx
index 8fef2ff..fb2f57a 100644
--- a/scintilla/lexers/LexSQL.cxx
+++ b/scintilla/lexers/LexSQL.cxx
@@ -283,6 +283,20 @@ private:
style == SCE_SQL_COMMENTDOCKEYWORDERROR;
}
+ bool IsCommentStyle (int style) {
+ switch (style) {
+ case SCE_SQL_COMMENT :
+ case SCE_SQL_COMMENTDOC :
+ case SCE_SQL_COMMENTLINE :
+ case SCE_SQL_COMMENTLINEDOC :
+ case SCE_SQL_COMMENTDOCKEYWORD :
+ case SCE_SQL_COMMENTDOCKEYWORDERROR :
+ return true;
+ default :
+ return false;
+ }
+ }
+
OptionsSQL options;
OptionSetSQL osSQL;
SQLStates sqlStates;
@@ -521,7 +535,7 @@ void SCI_METHOD LexerSQL::Fold(unsigned int startPos, int length, int initStyle,
style = styleNext;
styleNext = styler.StyleAt(i + 1);
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
- if (atEOL || (ch == ';')) {
+ if (atEOL || (!IsCommentStyle(style) && ch == ';')) {
if (endFound) {
//Maybe this is the end of "EXCEPTION" BLOCK (eg. "BEGIN ... EXCEPTION ... END;")
sqlStatesCurrentLine = sqlStates.IntoExceptionBlock(sqlStatesCurrentLine, false);
@@ -557,7 +571,7 @@ void SCI_METHOD LexerSQL::Fold(unsigned int startPos, int length, int initStyle,
if (ch == '(') {
if (levelCurrent > levelNext)
levelCurrent--;
- levelNext++;
+ levelNext++;
} else if (ch == ')') {
levelNext--;
} else if ((!options.foldOnlyBegin) && ch == ';') {