summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2011-01-31 12:47:16 +0000
committerXhmikosR <xhmikosr@users.sourceforge.net>2011-01-31 12:47:16 +0000
commitf60a72dfd4f35d973c82d378cc436c4a5ef660a6 (patch)
tree696e9bc7dffd0ebe13e48179dfa0bed3aa023368
parent5b7e6e9a6dd41899341d025526eb95ff4ccb0eb7 (diff)
downloadnotepad2-mod-f60a72dfd4f35d973c82d378cc436c4a5ef660a6.zip
notepad2-mod-f60a72dfd4f35d973c82d378cc436c4a5ef660a6.tar.gz
notepad2-mod-f60a72dfd4f35d973c82d378cc436c4a5ef660a6.tar.bz2
update Scintilla
git-svn-id: https://notepad2-mod.googlecode.com/svn/trunk@393 28bd50df-7adb-d945-0439-6e466c6a13cc
-rw-r--r--scintilla/lexers/LexSQL.cxx4
-rw-r--r--scintilla/src/Partitioning.h5
2 files changed, 8 insertions, 1 deletions
diff --git a/scintilla/lexers/LexSQL.cxx b/scintilla/lexers/LexSQL.cxx
index a2eaaad..8fef2ff 100644
--- a/scintilla/lexers/LexSQL.cxx
+++ b/scintilla/lexers/LexSQL.cxx
@@ -555,7 +555,9 @@ void SCI_METHOD LexerSQL::Fold(unsigned int startPos, int length, int initStyle,
*/ /* notepad2-mod custom code end */
if (style == SCE_SQL_OPERATOR) {
if (ch == '(') {
- levelNext++;
+ if (levelCurrent > levelNext)
+ levelCurrent--;
+ levelNext++;
} else if (ch == ')') {
levelNext--;
} else if ((!options.foldOnlyBegin) && ch == ';') {
diff --git a/scintilla/src/Partitioning.h b/scintilla/src/Partitioning.h
index d5b392a..01bdf8b 100644
--- a/scintilla/src/Partitioning.h
+++ b/scintilla/src/Partitioning.h
@@ -42,6 +42,10 @@ public:
/// Divide an interval into multiple partitions.
/// Useful for breaking a document down into sections such as lines.
+/// A 0 length interval has a single 0 length partition, numbered 0
+/// If interval not 0 length then each partition non-zero length
+/// When needed, positions after the interval are considered part of the last partition
+/// but the end of the last partition can be found with PositionFromPartition(last+1).
class Partitioning {
private:
@@ -153,6 +157,7 @@ public:
return pos;
}
+ /// Return value in range [0 .. Partitions() - 1] even for arguments outside interval
int PartitionFromPosition(int pos) const {
if (body->Length() <= 1)
return 0;