diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-09-16 15:38:10 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-09-16 15:57:16 +0300 |
commit | 01a21c289cd35725a6b4f983af1e3d9cb08723f9 (patch) | |
tree | 7c0aa0c2146771ae50f6ba393fb897ef671a383f | |
parent | 8729fe2b3b2640b2000b7618173a98c5d1f6921d (diff) | |
download | notepad2-mod-01a21c289cd35725a6b4f983af1e3d9cb08723f9.zip notepad2-mod-01a21c289cd35725a6b4f983af1e3d9cb08723f9.tar.gz notepad2-mod-01a21c289cd35725a6b4f983af1e3d9cb08723f9.tar.bz2 |
update scintilla to 99867c10d1da HG
-rw-r--r-- | scintilla/lexers/LexRuby.cxx | 7 | ||||
-rw-r--r-- | scintilla/lexers/LexSQL.cxx | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/scintilla/lexers/LexRuby.cxx b/scintilla/lexers/LexRuby.cxx index 429af91..0930de3 100644 --- a/scintilla/lexers/LexRuby.cxx +++ b/scintilla/lexers/LexRuby.cxx @@ -465,7 +465,9 @@ static bool sureThisIsNotHeredoc(int lt2StartPos, }
prevStyle = styler.StyleAt(firstWordPosn);
// If we have '<<' following a keyword, it's not a heredoc
- if (prevStyle != SCE_RB_IDENTIFIER) {
+ if (prevStyle != SCE_RB_IDENTIFIER
+ && prevStyle != SCE_RB_INSTANCE_VAR
+ && prevStyle != SCE_RB_CLASS_VAR) {
return definitely_not_a_here_doc;
}
int newStyle = prevStyle;
@@ -495,6 +497,9 @@ static bool sureThisIsNotHeredoc(int lt2StartPos, } else {
break;
}
+ // on second and next passes, only identifiers may appear since
+ // class and instance variable are private
+ prevStyle = SCE_RB_IDENTIFIER;
}
// Skip next batch of white-space
firstWordPosn = skipWhitespace(firstWordPosn, lt2StartPos, styler);
diff --git a/scintilla/lexers/LexSQL.cxx b/scintilla/lexers/LexSQL.cxx index eb0b710..5e40f90 100644 --- a/scintilla/lexers/LexSQL.cxx +++ b/scintilla/lexers/LexSQL.cxx @@ -719,8 +719,10 @@ void SCI_METHOD LexerSQL::Fold(unsigned int startPos, int length, int initStyle, levelNext--; //again for the "end case;" and block when
}
} else if (!options.foldOnlyBegin) {
- if (strcmp(s, "case") == 0)
+ if (strcmp(s, "case") == 0) {
sqlStatesCurrentLine = sqlStates.BeginCaseBlock(sqlStatesCurrentLine);
+ sqlStatesCurrentLine = sqlStates.CaseMergeWithoutWhenFound(sqlStatesCurrentLine, true);
+ }
if (levelCurrent > levelNext)
levelCurrent = levelNext;
@@ -728,7 +730,6 @@ void SCI_METHOD LexerSQL::Fold(unsigned int startPos, int length, int initStyle, if (!statementFound)
levelNext++;
- sqlStatesCurrentLine = sqlStates.CaseMergeWithoutWhenFound(sqlStatesCurrentLine, true);
statementFound = true;
} else if (levelCurrent > levelNext) {
// doesn't include this line into the folding block
|