summaryrefslogtreecommitdiff
path: root/src/editor.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-08-15 18:20:02 +0200
committerMaxime Coste <frrrwww@gmail.com>2012-08-15 18:20:02 +0200
commita2aefa299874437a87e3ff0aec8f71d7a490408a (patch)
tree5fb08bdeb86c04f145ba4ee615a4a0c8d64bbe73 /src/editor.cc
parent416785f53c1af30b7c4fbc1a9a22df046b90f009 (diff)
avoid keeping end of lines selected in Editor::erase
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>