handle 'gJ'

This commit is contained in:
hjk
2008-12-27 13:50:52 +01:00
committed by Roberto Raggi
parent b748b12d03
commit 15c89ea26a
2 changed files with 14 additions and 7 deletions

View File

@@ -404,9 +404,11 @@ void FakeVimHandler::Private::handleCommandMode(int key, const QString &text)
for (int i = qMax(count(), 2) - 1; --i >= 0; ) { for (int i = qMax(count(), 2) - 1; --i >= 0; ) {
m_tc.movePosition(EndOfLine); m_tc.movePosition(EndOfLine);
m_tc.deleteChar(); m_tc.deleteChar();
m_tc.insertText(" "); if (!m_gflag)
m_tc.insertText(" ");
} }
m_tc.movePosition(Left, MoveAnchor, 1); if (!m_gflag)
m_tc.movePosition(Left, MoveAnchor, 1);
} }
} else if (key == 'k' || key == Key_Up) { } else if (key == 'k' || key == Key_Up) {
m_tc.movePosition(Up, KeepAnchor, count()); m_tc.movePosition(Up, KeepAnchor, count());

View File

@@ -1,9 +1,14 @@
load(qttest_p4) QT += testlib
FAKEVIMSOURCE = /data/qt-creator/src/plugins/fakevim
INCLUDEPATH += $$FAKEVIMSOURCE
SOURCES += \ SOURCES += \
main.cpp \ main.cpp \
handler.cpp $$FAKEVIMSOURCE/handler.cpp
HEADERS += \
$$FAKEVIMSOURCE/handler.h
HEADER += \
handler.h