summaryrefslogtreecommitdiff
path: root/src/editor.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-11-26 19:38:07 +0100
committerMaxime Coste <frrrwww@gmail.com>2012-11-26 19:38:07 +0100
commit557128b641e7704715b72ebeabd4fc85b4f08d58 (patch)
treee74f383c52da99ca34e511efdf32cc45853c1dbb /src/editor.cc
parentcad4d3c01edd47bdb9dccd6b9998e0d9eaa4c65c (diff)
IncrementalInsert::move_cursors: use overloaded for LineCount/CharCount editor implementation
Diffstat (limited to 'src/editor.cc')
-rw-r--r--src/editor.cc14
1 files changed, 7 insertions, 7 deletions
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);
}
}