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:
David Schulz
2021-06-28 09:13:57 +02:00
parent eefb385918
commit c00330f905
30 changed files with 2204 additions and 2459 deletions

View File

@@ -36,6 +36,8 @@ QT_END_NAMESPACE
namespace Utils {
class MultiTextCursor;
class QTCREATOR_UTILS_EXPORT CommentDefinition
{
public:
@@ -62,4 +64,9 @@ QTextCursor unCommentSelection(const QTextCursor &cursor,
const CommentDefinition &definiton = CommentDefinition(),
bool preferSingleLine = false);
QTCREATOR_UTILS_EXPORT
MultiTextCursor unCommentSelection(const MultiTextCursor &cursor,
const CommentDefinition &definiton = CommentDefinition(),
bool preferSingleLine = false);
} // namespace Utils