Commit a17b57fa authored by hjk's avatar hjk
Browse files

Fixes: fakevim: fix positioning after df<x>

Details: removes an old hack...
parent e3eec1eb
...@@ -1078,8 +1078,13 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified, ...@@ -1078,8 +1078,13 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
m_moveType = MoveInclusive; m_moveType = MoveInclusive;
moveToWordBoundary(true, true); moveToWordBoundary(true, true);
finishMovement(); finishMovement();
} else if (key == 'f' || key == 'F') { } else if (key == 'f') {
m_subsubmode = FtSubSubMode; m_subsubmode = FtSubSubMode;
m_moveType = MoveInclusive;
m_subsubdata = key;
} else if (key == 'F') {
m_subsubmode = FtSubSubMode;
m_moveType = MoveExclusive;
m_subsubdata = key; m_subsubdata = key;
} else if (key == 'g') { } else if (key == 'g') {
if (m_gflag) { if (m_gflag) {
...@@ -1269,7 +1274,12 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified, ...@@ -1269,7 +1274,12 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
m_opcount.clear(); m_opcount.clear();
m_mvcount.clear(); m_mvcount.clear();
enterInsertMode(); enterInsertMode();
} else if (key == 't' || key == 'T') { } else if (key == 't') {
m_moveType = MoveInclusive;
m_subsubmode = FtSubSubMode;
m_subsubdata = key;
} else if (key == 'T') {
m_moveType = MoveExclusive;
m_subsubmode = FtSubSubMode; m_subsubmode = FtSubSubMode;
m_subsubdata = key; m_subsubdata = key;
} else if (key == 'u') { } else if (key == 'u') {
...@@ -1987,11 +1997,6 @@ void FakeVimHandler::Private::handleFfTt(int key) ...@@ -1987,11 +1997,6 @@ void FakeVimHandler::Private::handleFfTt(int key)
--pos; --pos;
else if (m_subsubdata == 'T') else if (m_subsubdata == 'T')
++pos; ++pos;
// FIXME: strange correction...
if (m_submode == DeleteSubMode && m_subsubdata == 'f')
++pos;
if (m_submode == DeleteSubMode && m_subsubdata == 't')
++pos;
if (forward) if (forward)
m_tc.movePosition(Right, KeepAnchor, pos - m_tc.position()); m_tc.movePosition(Right, KeepAnchor, pos - m_tc.position());
......
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