summaryrefslogtreecommitdiff
path: root/src/highlighters.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-05-08 12:34:57 +0100
committerMaxime Coste <mawww@kakoune.org>2017-05-08 12:34:57 +0100
commit12c498a0bd7fc03dcef88ef2d3564d0c1419eb8a (patch)
tree4867c9576801e8cbbc1fbb9cdd34b4f8200d3032 /src/highlighters.hh
parentf9a609e479e86fe08b1e64ee5ca6ae0f5e19a6bc (diff)
Distinguish between BufferRanges and InclusiveBufferRanges
Fixes #1257
Diffstat (limited to 'src/highlighters.hh')
-rw-r--r--src/highlighters.hh11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/highlighters.hh b/src/highlighters.hh
index e4063c52..6435efdc 100644
--- a/src/highlighters.hh
+++ b/src/highlighters.hh
@@ -9,8 +9,17 @@ namespace Kakoune
void register_highlighters();
+struct InclusiveBufferRange{ BufferCoord first, last; };
+
+inline bool operator==(const InclusiveBufferRange& lhs, const InclusiveBufferRange& rhs)
+{
+ return lhs.first == rhs.first and lhs.last == rhs.last;
+}
+String option_to_string(InclusiveBufferRange range);
+void option_from_string(StringView str, InclusiveBufferRange& opt);
+
using LineAndFlag = std::tuple<LineCount, String>;
-using RangeAndFace = std::tuple<BufferRange, String>;
+using RangeAndFace = std::tuple<InclusiveBufferRange, String>;
}