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 | dfaf7127c471e9d82294175e05e2472f37c51a08 (patch) | |
tree | 113ef905f6d4fd95aae5d9a20e2bd3a0028baf10 | |
parent | 4d109f6cd5a921d0c6c78324880bf2abd73ca84f (diff) | |
download | scintilla-mirror-dfaf7127c471e9d82294175e05e2472f37c51a08.tar.gz |
Add folding for CMake 3 function/endfunction
-rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
-rw-r--r-- | lexers/LexCmake.cxx | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 30a99d684..6774b2926 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -568,6 +568,10 @@ <a href="https://sourceforge.net/p/scintilla/feature-requests/1280/">Feature #1280</a>. </li> <li> + CMake folder folds function - endfunction. + <a href="https://sourceforge.net/p/scintilla/feature-requests/1289/">Feature #1289</a>. + </li> + <li> VB lexer adds support for VB2017 binary literal &B and digit separators 123_456. <a href="https://sourceforge.net/p/scintilla/feature-requests/1288/">Feature #1288</a>. </li> 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++; |