fakevim: fix repetition for dh/j/k/l

This commit is contained in:
Martin Aumueller
2009-02-17 00:50:05 +01:00
parent d8e675db9a
commit 6b78281193

View File

@@ -992,7 +992,7 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
if (m_fakeEnd && m_tc.block().length() > 1) if (m_fakeEnd && m_tc.block().length() > 1)
++n; ++n;
moveLeft(n); moveLeft(n);
finishMovement(); finishMovement("h");
} else if (key == 'H') { } else if (key == 'H') {
m_tc = EDITOR(cursorForPosition(QPoint(0, 0))); m_tc = EDITOR(cursorForPosition(QPoint(0, 0)));
moveDown(qMax(count() - 1, 0)); moveDown(qMax(count() - 1, 0));
@@ -1029,7 +1029,7 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
setAnchor(); setAnchor();
moveDown(count() + 1); moveDown(count() + 1);
} }
finishMovement(); finishMovement("j");
m_desiredColumn = savedColumn; m_desiredColumn = savedColumn;
} else if (key == 'J') { } else if (key == 'J') {
recordBeginGroup(); recordBeginGroup();
@@ -1057,12 +1057,12 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
setAnchor(); setAnchor();
moveUp(count() + 1); moveUp(count() + 1);
} }
finishMovement(); finishMovement("k");
m_desiredColumn = savedColumn; m_desiredColumn = savedColumn;
} else if (key == 'l' || key == Key_Right || key == ' ') { } else if (key == 'l' || key == Key_Right || key == ' ') {
m_moveType = MoveExclusive; m_moveType = MoveExclusive;
moveRight(qMin(count(), rightDist())); moveRight(qMin(count(), rightDist()));
finishMovement(); finishMovement("l");
} else if (key == 'L') { } else if (key == 'L') {
m_tc = EDITOR(cursorForPosition(QPoint(0, EDITOR(height())))); m_tc = EDITOR(cursorForPosition(QPoint(0, EDITOR(height()))));
moveUp(qMax(count(), 1)); moveUp(qMax(count(), 1));