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:
@@ -337,6 +337,9 @@ static bool trySplitComment(TextEditor::TextEditorWidget *editorWidget,
|
||||
if (!settings.m_enableDoxygen && !settings.m_leadingAsterisks)
|
||||
return false;
|
||||
|
||||
if (editorWidget->multiTextCursor().hasMultipleCursors())
|
||||
return false;
|
||||
|
||||
QTextCursor cursor = editorWidget->textCursor();
|
||||
if (!CPlusPlus::MatchingText::isInCommentHelper(cursor))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user