From ba50d853b34c0ce8d30460b8de6a18d8b98d2b34 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 9 Oct 2012 14:29:59 +0200 Subject: [PATCH] Editor: fix move_selection(LineCount) for utf8 --- src/editor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } }