forked from qt-creator/qt-creator
ClangFormat: Split formatting on save into a separate editor action
Do not combine formatting on save with other action happening before it. Fixes: QTCREATORBUG-22145 Change-Id: I435115400b9bef1377fac992b4952d3701fca3ac Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -475,7 +475,7 @@ bool CppEditorDocument::save(QString *errorString, const QString &fileName, bool
|
||||
|
||||
if (!editedRanges.empty()) {
|
||||
QTextCursor cursor(document());
|
||||
cursor.joinPreviousEditBlock();
|
||||
cursor.beginEditBlock();
|
||||
indenter()->format(editedRanges);
|
||||
cursor.endEditBlock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user