- Enhancement: When '{' is inputted and there are contents selected, auto add line breaks and indents.
This commit is contained in:
parent
ee488384a1
commit
7c379509bf
|
@ -2826,7 +2826,8 @@ bool Editor::handleBraceCompletion()
|
|||
} else if (oldSelEnd.ch > trimRight(s2).length()) {
|
||||
shouldBreakLine = true;
|
||||
}
|
||||
shouldAddEndLine = !s2.mid(oldSelEnd.ch).trimmed().isEmpty();
|
||||
if (shouldBreakLine)
|
||||
shouldAddEndLine = !s2.mid(oldSelEnd.ch).trimmed().isEmpty();
|
||||
}
|
||||
if (shouldBreakLine) {
|
||||
text = "{" + lineBreak() + text;
|
||||
|
|
Loading…
Reference in New Issue