diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2011-11-21 22:18:00 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2011-11-21 22:18:00 +0000 |
| commit | a7309fbe87f02591b709e769962d0859482b1053 (patch) | |
| tree | b063f8c9dde2c99dee9f892f122a3b7a0aa1d99f /src/window.cc | |
| parent | e34c5ef15fe979a6f535058bc2b1305c0d76ad17 (diff) | |
IncrementalInserter: fix erase
Diffstat (limited to 'src/window.cc')
| -rw-r--r-- | src/window.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/window.cc b/src/window.cc index 17d3904b..906258be 100644 --- a/src/window.cc +++ b/src/window.cc @@ -437,8 +437,10 @@ void IncrementalInserter::insert_capture(size_t index) void IncrementalInserter::erase() { - move_cursor(DisplayCoord(0, -1)); + for (auto& sel : m_window.m_selections) + sel = Selection(sel.first() - 1, sel.last() - 1); m_window.erase_noundo(); + m_window.scroll_to_keep_cursor_visible_ifn(); } void IncrementalInserter::move_cursor(const DisplayCoord& offset) |
