diff options
author | nyamatongwe <unknown> | 2006-03-30 06:26:23 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2006-03-30 06:26:23 +0000 |
commit | 4f2ccd7c957737459b74ced538a6810623c8ec86 (patch) | |
tree | 1ffe905bfc70fa06060497912081b9b625e2f42b | |
parent | 9b9a662ae657e28fd948c17883b36b2037e7b346 (diff) | |
download | scintilla-mirror-4f2ccd7c957737459b74ced538a6810623c8ec86.tar.gz |
Patch from mimir to allow only folding on "begin", not on "if" and "loop".
-rw-r--r-- | src/LexSQL.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/LexSQL.cxx b/src/LexSQL.cxx index 19d81ebcb..5717f2b26 100644 --- a/src/LexSQL.cxx +++ b/src/LexSQL.cxx @@ -242,6 +242,8 @@ static void FoldSQLDoc(unsigned int startPos, int length, int initStyle, WordList *[], Accessor &styler) { bool foldComment = styler.GetPropertyInt("fold.comment") != 0; bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + bool foldOnlyBegin = styler.GetPropertyInt("fold.sql.only.begin", 0) != 0; + unsigned int endPos = startPos + length; int visibleChars = 0; int lineCurrent = styler.GetLine(startPos); @@ -305,7 +307,7 @@ static void FoldSQLDoc(unsigned int startPos, int length, int initStyle, } else { s[j] = '\0'; } - if (strcmp(s, "if") == 0 || strcmp(s, "loop") == 0) { + if ((!foldOnlyBegin) && (strcmp(s, "if") == 0 || strcmp(s, "loop") == 0)) { if (endFound) { // ignore endFound = false; |