summaryrefslogtreecommitdiff
path: root/src/display_buffer.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-10-21 12:10:21 +1100
committerMaxime Coste <mawww@kakoune.org>2018-10-21 12:10:21 +1100
commit72bdd7900f5366ff9e99e78baf9c3bd32e0d51e8 (patch)
treebb69176c4846d007d0b94075e92bc541a5592588 /src/display_buffer.hh
parent7dbca46bf021583df8edfa20451a8121ca78293e (diff)
Move LineRangeSet to line_modification.hh
Diffstat (limited to 'src/display_buffer.hh')
-rw-r--r--src/display_buffer.hh14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/display_buffer.hh b/src/display_buffer.hh
index 3955ec25..e86dcdb0 100644
--- a/src/display_buffer.hh
+++ b/src/display_buffer.hh
@@ -4,6 +4,7 @@
#include "face.hh"
#include "hash.hh"
#include "coord.hh"
+#include "range.hh"
#include "string.hh"
#include "vector.hh"
#include "hash_map.hh"
@@ -12,18 +13,7 @@ namespace Kakoune
{
class Buffer;
-struct BufferRange{ BufferCoord begin, end; };
-
-inline bool operator==(const BufferRange& lhs, const BufferRange& rhs)
-{
- return lhs.begin == rhs.begin and lhs.end == rhs.end;
-}
-
-inline
-size_t hash_value(const BufferRange& range)
-{
- return hash_values(range.begin, range.end);
-}
+using BufferRange = Range<BufferCoord>;
class BufferIterator;
// Return a buffer iterator to the coord, tolerating one past end of line coords