diff --git a/src/plugins/fakevim/handler.cpp b/src/plugins/fakevim/handler.cpp index 2fba75104263951bf745864d2631d224195d9321..08063dc5a35c5dcef346b881b4841696eec4eda2 100644 --- a/src/plugins/fakevim/handler.cpp +++ b/src/plugins/fakevim/handler.cpp @@ -226,6 +226,7 @@ private: void recordInsert(int position, const QString &data); void recordRemove(int position, const QString &data); void recordRemove(int position, int length); + void recordMove(int position, int nestedCount); void undo(); void redo(); QStack<EditOperation> m_undoStack; @@ -671,8 +672,8 @@ void FakeVimHandler::Private::handleCommandMode(int key, const QString &text) QString text = m_registers[m_register]; int n = text.count(QChar(ParagraphSeparator)); if (n > 0) { - m_tc.movePosition(Down); m_tc.movePosition(StartOfLine); + m_tc.movePosition(Down); m_tc.insertText(text); m_tc.movePosition(Up, MoveAnchor, n); } else { @@ -680,6 +681,7 @@ void FakeVimHandler::Private::handleCommandMode(int key, const QString &text) m_tc.insertText(text); m_tc.movePosition(Left); } + m_dotCommand = "p"; } else if (key == control('r')) { redo(); } else if (key == 's') { @@ -1292,6 +1294,15 @@ void FakeVimHandler::Private::redo() #endif } +void FakeVimHandler::Private::recordMove(int position, int nestedCount) +{ + EditOperation op; + op.m_position = position; + op.m_itemCount = nestedCount; + m_undoStack.push(op); + m_redoStack.clear(); +} + void FakeVimHandler::Private::recordInsert(int position, const QString &data) { EditOperation op; diff --git a/tests/manual/gdbdebugger/simple/app.cpp b/tests/manual/gdbdebugger/simple/app.cpp index 33c8836029b0fedaf971d85b3aca46d36d1c2191..3646e7f2cb4ee6dc8a2cb483e043fdf8db14081d 100644 --- a/tests/manual/gdbdebugger/simple/app.cpp +++ b/tests/manual/gdbdebugger/simple/app.cpp @@ -35,6 +35,8 @@ #include <QtCore/QDir> #include <QtCore/QHash> #include <QtCore/QLibrary> +#include <QtCore/QLinkedList> +#include <QtCore/QList> #include <QtCore/QMap> #include <QtCore/QPointer> #include <QtCore/QString> @@ -191,6 +193,38 @@ void testIO() std::cerr << "std::cerr 3\n"; } +void testQLinkedList() +{ +#if 1 + QLinkedList<int> li; + QLinkedList<uint> lu; + + for (int i = 0; i != 3; ++i) + li.append(i); + li.append(102); + + + lu.append(102); + lu.append(102); + lu.append(102); + + QLinkedList<qulonglong> l; + l.append(42); + l.append(43); + l.append(44); + l.append(45); + + QLinkedList<Foo> f; + f.append(Foo(1)); + f.append(Foo(2)); +#endif + + QLinkedList<std::string> v; + v.push_back("aa"); + v.push_back("bb"); + v.push_back("cc"); + v.push_back("dd"); + } void testQList() { @@ -880,6 +914,7 @@ int main(int argc, char *argv[]) testPlugin(); testQList(); + testQLinkedList(); testNamespace(); //return 0; testQByteArray();