forked from qt-creator/qt-creator
FakeVim: Tilde command moves text cursor to the right
Change-Id: Ieff36ffa06b39dd7ff55551dd0fec627b8561939 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -3838,19 +3838,22 @@ bool FakeVimHandler::Private::handleNoSubMode(const Input &input)
|
||||
else if (input.is('U'))
|
||||
m_submode = UpCaseSubMode;
|
||||
} else {
|
||||
if (!atEndOfLine()) {
|
||||
beginEditBlock();
|
||||
setAnchor();
|
||||
moveRight(qMin(count(), rightDist()));
|
||||
if (input.is('~'))
|
||||
invertCase(currentRange());
|
||||
else if (input.is('u'))
|
||||
downCase(currentRange());
|
||||
else if (input.is('U'))
|
||||
upCase(currentRange());
|
||||
setDotCommand(QString::fromLatin1("%1%2").arg(count()).arg(input.raw()));
|
||||
endEditBlock();
|
||||
beginEditBlock();
|
||||
if (atEndOfLine())
|
||||
moveLeft();
|
||||
setAnchor();
|
||||
moveRight(qMin(count(), rightDist()));
|
||||
if (input.is('~')) {
|
||||
const int pos = position();
|
||||
invertCase(currentRange());
|
||||
setPosition(pos);
|
||||
} else if (input.is('u')) {
|
||||
downCase(currentRange());
|
||||
} else if (input.is('U')) {
|
||||
upCase(currentRange());
|
||||
}
|
||||
setDotCommand(QString::fromLatin1("%1%2").arg(count()).arg(input.raw()));
|
||||
endEditBlock();
|
||||
}
|
||||
} else if (input.isKey(Key_Delete)) {
|
||||
setAnchor();
|
||||
@@ -7533,6 +7536,7 @@ void FakeVimHandler::setTextCursorPosition(int position)
|
||||
d->setPosition(pos);
|
||||
else
|
||||
d->setAnchorAndPosition(pos, pos);
|
||||
d->m_fakeEnd = false;
|
||||
d->setTargetColumn();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user