summaryrefslogtreecommitdiff
path: root/src/selection.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/selection.hh')
-rw-r--r--src/selection.hh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/selection.hh b/src/selection.hh
index b29af9a2..29a008a2 100644
--- a/src/selection.hh
+++ b/src/selection.hh
@@ -12,7 +12,7 @@ namespace Kakoune
// Selections are oriented, first may be > last, and inclusive.
// Selection updates it's iterators according to modifications made
// in the buffer.
-struct Selection
+struct Selection : public BufferChangeListener
{
Selection(const BufferIterator& first, const BufferIterator& last);
Selection(const Selection& other);
@@ -30,6 +30,9 @@ struct Selection
void merge_with(const Selection& selection);
+ void on_insert(const BufferIterator& begin, const BufferIterator& end);
+ void on_erase(const BufferIterator& begin, const BufferIterator& end);
+
private:
BufferIterator m_first;
BufferIterator m_last;