From 31c0931dffbbf100ddcf1f2f2edc0d830fec8f39 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 16 Jul 2012 21:51:37 +0200 Subject: Go back to a generic BufferChangeListener interface for selection update --- src/selection.hh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/selection.hh') 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; -- cgit v1.2.3