diff options
Diffstat (limited to 'src/Selection.h')
-rw-r--r-- | src/Selection.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Selection.h b/src/Selection.h index 1ad4fa7c0..c8daa3932 100644 --- a/src/Selection.h +++ b/src/Selection.h @@ -133,6 +133,9 @@ struct SelectionRange { void MinimizeVirtualSpace() noexcept; }; +// Deliberately an enum rather than an enum class to allow treating as bool +enum InSelection { inNone, inMain, inAdditional }; + class Selection { std::vector<SelectionRange> ranges; std::vector<SelectionRange> rangesSaved; @@ -178,8 +181,9 @@ public: void DropAdditionalRanges(); void TentativeSelection(SelectionRange range); void CommitTentative() noexcept; - int CharacterInSelection(Sci::Position posCharacter) const noexcept; - int InSelectionForEOL(Sci::Position pos) const noexcept; + InSelection RangeType(size_t r) const noexcept; + InSelection CharacterInSelection(Sci::Position posCharacter) const noexcept; + InSelection InSelectionForEOL(Sci::Position pos) const noexcept; Sci::Position VirtualSpaceFor(Sci::Position pos) const noexcept; void Clear(); void RemoveDuplicates(); |