Commit 5515b27a authored by hjk's avatar hjk Committed by hjk
Browse files

fakevim: fix <n>r<Return>

Was reported on the feedback form.

Change-Id: Iab2517f4bd29bbad211eced7c268f93d928bb5aa
Reviewed-on: http://codereview.qt.nokia.com/1657

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 3c9fa90e
......@@ -1839,8 +1839,15 @@ EventResult FakeVimHandler::Private::handleCommandMode(const Input &input)
} else if (count() <= rightDist()) {
setAnchor();
moveRight(count());
replaceText(currentRange(), QString(count(), input.asChar()));
moveLeft();
if (input.isReturn()) {
beginEditBlock();
replaceText(currentRange(), QString());
insertText(QString("\n"));
endEditBlock();
} else {
replaceText(currentRange(), QString(count(), input.asChar()));
moveLeft();
}
setTargetColumn();
setDotCommand("%1r" + input.text(), count());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment