forked from qt-creator/qt-creator
Editor: multi cursor support
Adding a way to create multiple cursors that can insert/remove text at arbitrary positions in the document. Adding cursors is done by pressing alt + up/down or by clicking into the editor while holding the alt key. Fixes: QTCREATORBUG-16013 Change-Id: I495d27d95a3d277220946616ef30efc241da0120 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <utils/id.h>
|
||||
#include <utils/link.h>
|
||||
#include <utils/multitextcursor.h>
|
||||
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
@@ -95,9 +96,8 @@ public:
|
||||
int currentCursorPosition = -1);
|
||||
void autoReindent(const QTextCursor &cursor, int currentCursorPosition = -1);
|
||||
void autoFormatOrIndent(const QTextCursor &cursor);
|
||||
QTextCursor indent(const QTextCursor &cursor, bool blockSelection, int column, int *offset);
|
||||
QTextCursor unindent(const QTextCursor &cursor, bool blockSelection = false, int column = 0,
|
||||
int *offset = nullptr);
|
||||
Utils::MultiTextCursor indent(const Utils::MultiTextCursor &cursor);
|
||||
Utils::MultiTextCursor unindent(const Utils::MultiTextCursor &cursor);
|
||||
|
||||
void setFormatter(Formatter *indenter); // transfers ownership
|
||||
void autoFormat(const QTextCursor &cursor);
|
||||
|
||||
Reference in New Issue
Block a user