Commit 115b3269 authored by Martin Aumüller's avatar Martin Aumüller Committed by hjk
Browse files

fakevim: 'dtd' would have deleted a line instead of deleteing to the next 'd'



Merge-request: 113
Reviewed-by: default avatarhjk <qtc-committer@nokia.com>
parent a7cf72a9
......@@ -1140,7 +1140,21 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
{
EventResult handled = EventHandled;
if (m_submode == WindowSubMode) {
if (m_subsubmode == FtSubSubMode) {
m_semicolonType = m_subsubdata;
m_semicolonKey = key;
bool valid = handleFfTt(key);
m_subsubmode = NoSubSubMode;
if (!valid) {
m_submode = NoSubMode;
finishMovement();
} else {
finishMovement(QString("%1%2%3")
.arg(count())
.arg(QChar(m_semicolonType))
.arg(QChar(m_semicolonKey)));
}
} else if (m_submode == WindowSubMode) {
emit q->windowCommandRequested(key);
m_submode = NoSubMode;
} else if (m_submode == RegisterSubMode) {
......@@ -1219,20 +1233,6 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
handleCommand(QString(QLatin1Char('x')));
else if (key == 'Q')
handleCommand("q!");
} else if (m_subsubmode == FtSubSubMode) {
m_semicolonType = m_subsubdata;
m_semicolonKey = key;
bool valid = handleFfTt(key);
m_subsubmode = NoSubSubMode;
if (!valid) {
m_submode = NoSubMode;
finishMovement();
} else {
finishMovement(QString("%1%2%3")
.arg(count())
.arg(QChar(m_semicolonType))
.arg(QChar(m_semicolonKey)));
}
} else if (m_submode == ReplaceSubMode) {
if (count() <= (rightDist() + atEndOfLine()) && text.size() == 1
&& (text.at(0).isPrint() || text.at(0).isSpace())) {
......
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