summaryrefslogtreecommitdiff
path: root/src/editor.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-10-09 14:29:59 +0200
committerMaxime Coste <frrrwww@gmail.com>2012-10-09 14:29:59 +0200
commitba50d853b34c0ce8d30460b8de6a18d8b98d2b34 (patch)
treefec8ec24bb755cad91d6979139be88f6dc443f4c /src/editor.cc
parent1af7465107ae4e90be48d53b60e07e9a62cc0994 (diff)
Editor: fix move_selection(LineCount) for utf8
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 9dbd9b56..34ab9c87 100644
--- a/src/editor.cc
+++ b/src/editor.cc
@@ -120,7 +120,7 @@ void Editor::move_selections(LineCount offset, SelectMode mode)
{
BufferCoord pos = m_buffer.line_and_column_at(sel.last());
pos.line += offset;
- BufferIterator last = m_buffer.iterator_at(pos, true);
+ BufferIterator last = utf8::finish(m_buffer.iterator_at(pos, true));
sel.selection = Selection(mode == SelectMode::Extend ? sel.first() : last, last);
}
}