aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-05-20 16:20:59 +1000
committerNeil <nyamatongwe@gmail.com>2021-05-20 16:20:59 +1000
commit1a4952f5f7b03e65dbe1f38fb7826748e5b8d66f (patch)
treebf413e5b92d31cd861f3721feeb65996ff621ab0 /src/Document.h
parent45934586be616146b0af470983ba8963e869bd36 (diff)
downloadscintilla-mirror-1a4952f5f7b03e65dbe1f38fb7826748e5b8d66f.tar.gz
Add LevelIsHeader and LevelIsWhitespace as fold levels will become enum class
later so not work well with '&'.
Diffstat (limited to 'src/Document.h')
-rw-r--r--src/Document.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Document.h b/src/Document.h
index 3e57d1449..cbb91e574 100644
--- a/src/Document.h
+++ b/src/Document.h
@@ -168,6 +168,14 @@ constexpr int LevelNumber(int level) noexcept {
return level & SC_FOLDLEVELNUMBERMASK;
}
+constexpr bool LevelIsHeader(int level) noexcept {
+ return (level & SC_FOLDLEVELHEADERFLAG) == SC_FOLDLEVELHEADERFLAG;
+}
+
+constexpr bool LevelIsWhitespace(int level) noexcept {
+ return (level & SC_FOLDLEVELWHITEFLAG) == SC_FOLDLEVELWHITEFLAG;
+}
+
class LexInterface {
protected:
Document *pdoc;