summaryrefslogtreecommitdiff
path: root/src/editor.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-08-15 18:06:59 +0200
committerMaxime Coste <frrrwww@gmail.com>2012-08-15 18:06:59 +0200
commit390d4ccdfc18d6f9e9827014fc7b7f4bbc2381dc (patch)
treebc68b75f70fb07538d3d911f8d7fd596564368bc /src/editor.cc
parent260b30e6d90eee942e965d3d96038fb6632b763a (diff)
Buffer::{iterator_at,clamp} takes an optional avoid_eol parameter
when avoid_eol is true, clamping does avoid end-of-line if possible
Diffstat (limited to 'src/editor.cc')
-rw-r--r--src/editor.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/editor.cc b/src/editor.cc
index 817ce8e7..b262698b 100644
--- a/src/editor.cc
+++ b/src/editor.cc
@@ -113,7 +113,7 @@ void Editor::move_selections(const BufferCoord& offset, bool append)
for (auto& sel : m_selections.back())
{
BufferCoord pos = m_buffer.line_and_column_at(sel.last());
- BufferIterator last = m_buffer.iterator_at(pos + BufferCoord(offset));
+ BufferIterator last = m_buffer.iterator_at(pos + offset, true);
sel = Selection(append ? sel.first() : last, last);
}
}