summaryrefslogtreecommitdiff
path: root/src/editor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/editor.cc')
-rw-r--r--src/editor.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/editor.cc b/src/editor.cc
index b262698b..06f47149 100644
--- a/src/editor.cc
+++ b/src/editor.cc
@@ -21,8 +21,11 @@ Editor::Editor(Buffer& buffer)
void Editor::erase()
{
scoped_edition edition(*this);
- for (auto& sel : selections())
+ for (auto& sel : m_selections.back())
+ {
m_buffer.erase(sel.begin(), sel.end());
+ sel.avoid_eol();
+ }
}
template<bool append>