From 557128b641e7704715b72ebeabd4fc85b4f08d58 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 26 Nov 2012 19:38:07 +0100 Subject: IncrementalInsert::move_cursors: use overloaded for LineCount/CharCount editor implementation --- src/editor.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/editor.cc') diff --git a/src/editor.cc b/src/editor.cc index 1d0d7d0e..4334e946 100644 --- a/src/editor.cc +++ b/src/editor.cc @@ -461,14 +461,14 @@ void IncrementalInserter::erase() } } -void IncrementalInserter::move_cursors(const BufferCoord& offset) +void IncrementalInserter::move_cursors(CharCount move) { - for (auto& sel : m_editor.m_selections) - { - BufferCoord pos = sel.last().coord(); - BufferIterator it = m_editor.m_buffer->iterator_at(pos + offset); - sel = Selection(it, it); - } + m_editor.move_selections(move, SelectMode::Replace); +} + +void IncrementalInserter::move_cursors(LineCount move) +{ + m_editor.move_selections(move, SelectMode::Replace); } } -- cgit v1.2.3