aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Editor.h')
-rw-r--r--src/Editor.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Editor.h b/src/Editor.h
index 08e7d134b..9af2add43 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -624,6 +624,13 @@ protected: // ScintillaBase subclass needs access to much of Editor
return static_cast<const char *>(PtrFromUPtr(wParam));
}
+ constexpr std::optional<FoldLevel> OptionalFoldLevel(Scintilla::sptr_t lParam) {
+ if (lParam >= 0) {
+ return static_cast<FoldLevel>(lParam);
+ }
+ return std::nullopt;
+ }
+
static Scintilla::sptr_t StringResult(Scintilla::sptr_t lParam, const char *val) noexcept;
static Scintilla::sptr_t BytesResult(Scintilla::sptr_t lParam, const unsigned char *val, size_t len) noexcept;