aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexSQL.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/LexSQL.cxx')
-rw-r--r--src/LexSQL.cxx4
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;