diff options
Diffstat (limited to 'src/plugins/fakevim/fakevimhandler.h')
-rw-r--r-- | src/plugins/fakevim/fakevimhandler.h | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/src/plugins/fakevim/fakevimhandler.h b/src/plugins/fakevim/fakevimhandler.h index f4fb225613..8999747530 100644 --- a/src/plugins/fakevim/fakevimhandler.h +++ b/src/plugins/fakevim/fakevimhandler.h @@ -67,7 +67,6 @@ struct ExCommand const Range &range = Range()); bool matches(const QString &min, const QString &full) const; - void setContentsFromLine(const QString &line); QString cmd; bool hasBang; @@ -76,6 +75,17 @@ struct ExCommand int count; }; +// message levels sorted by severity +enum MessageLevel +{ + MessageMode, // show current mode (format "-- %1 --") + MessageCommand, // show last Ex command or search + MessageInfo, // result of a command + MessageWarning, // warning + MessageError, // error + MessageShowCmd // partial command +}; + class FakeVimHandler : public QObject { Q_OBJECT @@ -93,8 +103,7 @@ public slots: void setCurrentFileName(const QString &fileName); QString currentFileName() const; - void showBlackMessage(const QString &msg); - void showRedMessage(const QString &msg); + void showMessage(MessageLevel level, const QString &msg); // This executes an "ex" style command taking context // information from the current widget. @@ -113,11 +122,20 @@ public slots: int logicalIndentation(const QString &line) const; QString tabExpand(int n) const; + void miniBufferTextEdited(const QString &text, int cursorPos, int anchorPos); + + // Set text cursor position. Keeps anchor if in visual mode. + void setTextCursorPosition(int position); + + bool jumpToLocalMark(QChar mark, bool backTickMode); + signals: - void commandBufferChanged(const QString &msg, int pos); + void commandBufferChanged(const QString &msg, int cursorPos, + int anchorPos, int messageLevel, QObject *eventFilter); void statusDataChanged(const QString &msg); void extraInformationChanged(const QString &msg); void selectionChanged(const QList<QTextEdit::ExtraSelection> &selection); + void highlightMatches(const QString &needle); void writeAllRequested(QString *error); void moveToMatchingParenthesis(bool *moved, bool *forward, QTextCursor *cursor); void checkForElectricCharacter(bool *result, QChar c); @@ -130,6 +148,11 @@ signals: void handleExCommandRequested(bool *handled, const ExCommand &cmd); void requestSetBlockSelection(bool on); void requestHasBlockSelection(bool *on); + void foldToggle(int depth); + void foldAll(bool fold); + void fold(int depth, bool fold); + void foldGoTo(int count, bool current); + void jumpToGlobalMark(QChar mark, bool backTickMode, const QString &fileName); public: class Private; |