diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index ce35fea860d43c58c4107d1fcb3356596880c4e8..9991b34340a174148d3f881f4934dcfdfda849aa 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -1830,7 +1830,7 @@ void FakeVimHandler::Private::handleExCommand(const QString &cmd0) if (position != -1) { m_tc.setPosition(position); m_tc.movePosition(QTextCursor::NextCharacter, - QTextCursor::KeepAnchor, pattern.matchedLength()); + KeepAnchor, pattern.matchedLength()); QString text = m_tc.selectedText(); if (text.endsWith(ParagraphSeparator)) { text = replacement + "\n"; @@ -2372,11 +2372,13 @@ void FakeVimHandler::Private::recordJump() UNDO_DEBUG("jumps: " << m_jumpListUndo); } -struct UndoBreaker : public QAbstractUndoItem +class UndoBreaker : public QAbstractUndoItem { +public: UndoBreaker(FakeVimHandler::Private *doc) : m_doc(doc) {} void undo() { m_doc->m_needMoreUndo = true; } void redo() { m_doc->m_needMoreUndo = true; } +private: FakeVimHandler::Private *m_doc; };