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:
Ivan Donchevskii
2019-03-15 13:19:15 +01:00
parent 312c4a1433
commit 85dcfafe5b

View File

@@ -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();
}