diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2011-10-24 14:26:21 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2011-10-24 14:26:21 +0000 |
| commit | d2c6ceb47b532d125c3cafffdca79fada54ee21f (patch) | |
| tree | e13757428f023d134cf0ba51bfab880a60c8ae40 /src/window.cc | |
| parent | bace526fa31f1ce9fbc89a1c468f2dc91bee8845 (diff) | |
DynamicBufferIterator: add and use in Selections
DynamicBufferIterator are a new type of BufferIterators that
automatically update themselves when their buffer is modified.
Selections now uses this type of iterators instead of plain ones
Diffstat (limited to 'src/window.cc')
| -rw-r--r-- | src/window.cc | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/window.cc b/src/window.cc index 0c7991c7..5f10618c 100644 --- a/src/window.cc +++ b/src/window.cc @@ -144,10 +144,7 @@ void Window::erase_noundo() { check_invariant(); for (auto& sel : m_selections) - { m_buffer.erase(sel.begin(), sel.end()); - sel = Selection(sel.begin(), sel.begin()); - } scroll_to_keep_cursor_visible_ifn(); } @@ -183,10 +180,7 @@ void Window::insert(const String& string) void Window::insert_noundo(const String& string) { for (auto& sel : m_selections) - { m_buffer.insert(sel.begin(), string); - sel.offset(string.length()); - } scroll_to_keep_cursor_visible_ifn(); } |
