Fixes: fakevim: fix positioning after df<x>

Details: removes an old hack...
This commit is contained in:
hjk
2009-03-12 15:04:50 +01:00
parent e3eec1eb86
commit a17b57fa16

View File

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