From b3e587375a45a543ed75bd56e55d1d1c57a133d2 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 30 Mar 2006 06:26:23 +0000 Subject: Patch from mimir to allow only folding on "begin", not on "if" and "loop". --- src/LexSQL.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/LexSQL.cxx') 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; -- cgit v1.2.3