From d05dcb0422074dcef71295607e26808f7675dfce Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 9 Dec 2010 23:20:04 +1100 Subject: Folding for Bash here documents. Feature #3118223. --- lexers/LexBash.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lexers/LexBash.cxx b/lexers/LexBash.cxx index 1c844a6fd..c39905818 100644 --- a/lexers/LexBash.cxx +++ b/lexers/LexBash.cxx @@ -640,6 +640,14 @@ static void FoldBashDoc(unsigned int startPos, int length, int, WordList *[], levelCurrent--; } } + // Here Document folding + if (style == SCE_SH_HERE_DELIM) { + if (ch == '<' && chNext == '<') { + levelCurrent++; + } + } else if (style == SCE_SH_HERE_Q && styler.StyleAt(i+1) == SCE_PL_DEFAULT) { + levelCurrent--; + } if (atEOL) { int lev = levelPrev; if (visibleChars == 0 && foldCompact) -- cgit v1.2.3