Window: fix erase

This commit is contained in:
Maxime Coste 2011-09-18 20:09:25 +00:00
parent 85e2a31b31
commit 8a4a3e447b

View File

@ -24,9 +24,12 @@ void Window::erase()
for (auto& sel : m_selections)
{
sel.canonicalize();
m_buffer.erase(sel.begin(), sel.end());
sel = Selection(sel.begin(), sel.begin());
}
if (not m_selections.empty())
m_cursor = line_and_column_at(m_selections.back().end());
m_buffer.end_undo_group();
}