summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-05-12 13:59:21 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-05-13 19:01:27 +0100
commit67a251ffd560d79e8337fef0aee8d8285d34355e (patch)
tree852a301689b7612f958cda7728004b59aa47e335 /src/normal.cc
parentddd8f8d392ae059298ffa6175165f6e224a009f9 (diff)
Pass a at_end param to BufferChangeListener::on_{insert,erase}
Diffstat (limited to 'src/normal.cc')
-rw-r--r--src/normal.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/normal.cc b/src/normal.cc
index 062f512c..5016ece9 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -1239,18 +1239,18 @@ public:
ModifiedRangesListener(Buffer& buffer)
: BufferChangeListener_AutoRegister(buffer) {}
- void on_insert(const Buffer& buffer, ByteCoord begin, ByteCoord end)
+ void on_insert(const Buffer& buffer, ByteCoord begin, ByteCoord end, bool at_end)
{
- m_ranges.update_insert(buffer, begin, end);
+ m_ranges.update_insert(begin, end, at_end);
auto it = std::upper_bound(m_ranges.begin(), m_ranges.end(), begin,
[](ByteCoord c, const Selection& sel)
{ return c < sel.min(); });
m_ranges.insert(it, Selection{ begin, buffer.char_prev(end) });
}
- void on_erase(const Buffer& buffer, ByteCoord begin, ByteCoord end)
+ void on_erase(const Buffer& buffer, ByteCoord begin, ByteCoord end, bool at_end)
{
- m_ranges.update_erase(buffer, begin, end);
+ m_ranges.update_erase(begin, end, at_end);
auto pos = std::min(begin, buffer.back_coord());
auto it = std::upper_bound(m_ranges.begin(), m_ranges.end(), pos,
[](ByteCoord c, const Selection& sel)