diff options
| author | Jad Altahan <xviyy@aol.com> | 2019-05-28 19:32:26 +1000 |
|---|---|---|
| committer | Jad Altahan <xviyy@aol.com> | 2019-05-28 19:32:26 +1000 |
| commit | e14cf9422229e4f2f1a1ea8eabb6c34ff0ba3bc7 (patch) | |
| tree | 30b7c0061a22a6f3774a7a5753ec2f455d853c72 /lexers/LexCmake.cxx | |
| parent | cd30ef57668800d27e4c058bf750a17525c4d461 (diff) | |
| download | scintilla-mirror-e14cf9422229e4f2f1a1ea8eabb6c34ff0ba3bc7.tar.gz | |
Backport: Add folding for CMake 3 function/endfunction
Backport of changeset 7537:03bbd7abb2f8.
Diffstat (limited to 'lexers/LexCmake.cxx')
| -rw-r--r-- | lexers/LexCmake.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lexers/LexCmake.cxx b/lexers/LexCmake.cxx index b8fe15496..e3835c5c3 100644 --- a/lexers/LexCmake.cxx +++ b/lexers/LexCmake.cxx @@ -85,10 +85,11 @@ static int calculateFoldCmake(Sci_PositionU start, Sci_PositionU end, int foldle if ( CompareCaseInsensitive(s, "IF") == 0 || CompareCaseInsensitive(s, "WHILE") == 0 || CompareCaseInsensitive(s, "MACRO") == 0 || CompareCaseInsensitive(s, "FOREACH") == 0 - || CompareCaseInsensitive(s, "ELSEIF") == 0 ) + || CompareCaseInsensitive(s, "FUNCTION") == 0 || CompareCaseInsensitive(s, "ELSEIF") == 0) newFoldlevel++; else if ( CompareCaseInsensitive(s, "ENDIF") == 0 || CompareCaseInsensitive(s, "ENDWHILE") == 0 - || CompareCaseInsensitive(s, "ENDMACRO") == 0 || CompareCaseInsensitive(s, "ENDFOREACH") == 0) + || CompareCaseInsensitive(s, "ENDMACRO") == 0 || CompareCaseInsensitive(s, "ENDFOREACH") == 0 + || CompareCaseInsensitive(s, "ENDFUNCTION") == 0) newFoldlevel--; else if ( bElse && CompareCaseInsensitive(s, "ELSEIF") == 0 ) newFoldlevel++; |
