forked from qt-creator/qt-creator
TextEditor: Consider angle brackets as braces too
When performing "surround with brackets" allow this feature for angle brackets as well. Change-Id: I4192fd832aa3e692d9287b5b873e9ea31ec2b7e3 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -104,6 +104,8 @@ static QString surroundSelectionWithBrackets(const QString &textToInsert, const
|
|||||||
replacement = selection + QLatin1Char(')');
|
replacement = selection + QLatin1Char(')');
|
||||||
} else if (textToInsert == QLatin1String("[")) {
|
} else if (textToInsert == QLatin1String("[")) {
|
||||||
replacement = selection + QLatin1Char(']');
|
replacement = selection + QLatin1Char(']');
|
||||||
|
} else if (textToInsert == QLatin1String("<")) {
|
||||||
|
replacement = selection + QLatin1Char('>');
|
||||||
} else if (textToInsert == QLatin1String("{")) {
|
} else if (textToInsert == QLatin1String("{")) {
|
||||||
//If the text spans multiple lines, insert on different lines
|
//If the text spans multiple lines, insert on different lines
|
||||||
replacement = selection;
|
replacement = selection;
|
||||||
|
Reference in New Issue
Block a user