Commit 135b0a0d authored by Christoph Cullmann's avatar Christoph Cullmann

fix ::move of MovingCursor

parent 3c581f9f
......@@ -96,14 +96,12 @@ bool MovingCursor::gotoPreviousLine()
bool MovingCursor::move(int chars, WrapBehavior wrapBehavior)
const KTextEditor::Cursor oldPos = toCursor();
DocumentCursor dc(document(), oldPos);
DocumentCursor dc(document(), toCursor());
const bool success = dc.move(chars, static_cast<DocumentCursor::WrapBehavior>(wrapBehavior));
if (success && dc.toCursor() != oldPos) {
if (success && dc.toCursor() != toCursor())
setPosition (dc.toCursor());
return success;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment