Add possibility to comment selection after the white spaces

Fixes: QTCREATORBUG-29410
Change-Id: I736378e0b5fb542a6c1032a47adfb251b50ce2ef
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Xavier BESSON
2023-09-12 14:40:59 +02:00
parent 6cf4b1a3cd
commit 5cfe69ea1e
6 changed files with 47 additions and 10 deletions

View File

@@ -7698,8 +7698,10 @@ void TextEditorWidget::rewrapParagraph()
void TextEditorWidget::unCommentSelection()
{
const bool singleLine = d->m_document->typingSettings().m_preferSingleLineComments;
CommentDefinition commentDefinition = d->m_commentDefinition;
commentDefinition.isAfterWhitespace = d->m_document->typingSettings().m_preferAfterWhitespaceComments;
const MultiTextCursor cursor = Utils::unCommentSelection(multiTextCursor(),
d->m_commentDefinition,
commentDefinition,
singleLine);
setMultiTextCursor(cursor);
}