diff options
| author | Zufu Liu <unknown> | 2019-10-13 19:14:54 +1100 |
|---|---|---|
| committer | Zufu Liu <unknown> | 2019-10-13 19:14:54 +1100 |
| commit | cf068493da469a4893b032f92ce01153d5a7fd0e (patch) | |
| tree | 11dd0d20b8414d0da3a9e1cc486829f378d72e94 | |
| parent | 637ffffc35cf43b9ed9f4387515f2977bc5ba89f (diff) | |
| download | scintilla-mirror-cf068493da469a4893b032f92ce01153d5a7fd0e.tar.gz | |
Backport: Bug [#2131]. Turn off whitespace fold flag when fold.compact=0.
Backport of changeset 7704:93f76420e730.
| -rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
| -rw-r--r-- | lexers/LexTCL.cxx | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 9c141ee3b..f52297cea 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -571,6 +571,10 @@ <a href="https://sourceforge.net/p/scintilla/feature-requests/1306/">Feature #1306</a>. </li> <li> + TCL folder can turn off whitespace flag by setting fold.compact property to 0. + <a href="https://sourceforge.net/p/scintilla/bugs/2131/">Bug #2131</a>. + </li> + <li> Optimize setting up keyword lists in lexers. <a href="https://sourceforge.net/p/scintilla/feature-requests/1305/">Feature #1305</a>. </li> diff --git a/lexers/LexTCL.cxx b/lexers/LexTCL.cxx index 1ea6ecf6e..5bba2b6a1 100644 --- a/lexers/LexTCL.cxx +++ b/lexers/LexTCL.cxx @@ -46,6 +46,7 @@ static inline bool IsANumberChar(int ch) { static void ColouriseTCLDoc(Sci_PositionU startPos, Sci_Position length, int , WordList *keywordlists[], Accessor &styler) { #define isComment(s) (s==SCE_TCL_COMMENT || s==SCE_TCL_COMMENTLINE || s==SCE_TCL_COMMENT_BOX || s==SCE_TCL_BLOCK_COMMENT) bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + const bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; bool commentLevel = false; bool subBrace = false; // substitution begin with a brace ${.....} enum tLineState {LS_DEFAULT, LS_OPEN_COMMENT, LS_OPEN_DOUBLE_QUOTE, LS_COMMENT_BOX, LS_MASK_STATE = 0xf, @@ -199,7 +200,7 @@ next: } } int flag = 0; - if (!visibleChars) + if (!visibleChars && foldCompact) flag = SC_FOLDLEVELWHITEFLAG; if (currentLevel > previousLevel) flag = SC_FOLDLEVELHEADERFLAG; |
