From 5fcf4048467cd957b34364bce1699ad7b12309e2 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 14 Nov 2023 13:51:52 +0100 Subject: [PATCH] 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 --- src/plugins/texteditor/autocompleter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/texteditor/autocompleter.cpp b/src/plugins/texteditor/autocompleter.cpp index 6a48718a20d..dccd5ecda3d 100644 --- a/src/plugins/texteditor/autocompleter.cpp +++ b/src/plugins/texteditor/autocompleter.cpp @@ -104,6 +104,8 @@ static QString surroundSelectionWithBrackets(const QString &textToInsert, const replacement = selection + QLatin1Char(')'); } else if (textToInsert == QLatin1String("[")) { replacement = selection + QLatin1Char(']'); + } else if (textToInsert == QLatin1String("<")) { + replacement = selection + QLatin1Char('>'); } else if (textToInsert == QLatin1String("{")) { //If the text spans multiple lines, insert on different lines replacement = selection;