diff options
| author | nyamatongwe <devnull@localhost> | 2006-03-30 06:26:23 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2006-03-30 06:26:23 +0000 | 
| commit | b3e587375a45a543ed75bd56e55d1d1c57a133d2 (patch) | |
| tree | 1ffe905bfc70fa06060497912081b9b625e2f42b | |
| parent | 6a328c6c76ee2a66445621861fefcebc3a7f120c (diff) | |
| download | scintilla-mirror-b3e587375a45a543ed75bd56e55d1d1c57a133d2.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;  | 
