forked from qt-creator/qt-creator
ClangFormat: Do not format code on auto save
Fixes: QTCREATORBUG-21990 Change-Id: I42f007bf9cb4a73c1561769d8e0eeeca266b0dba Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -461,7 +461,7 @@ static int formatRange(QTextDocument *doc,
|
||||
|
||||
bool CppEditorDocument::save(QString *errorString, const QString &fileName, bool autoSave)
|
||||
{
|
||||
if (indenter()->formatOnSave()) {
|
||||
if (indenter()->formatOnSave() && !autoSave) {
|
||||
QTextCursor cursor(document());
|
||||
cursor.joinPreviousEditBlock();
|
||||
auto *layout = qobject_cast<TextEditor::TextDocumentLayout *>(document()->documentLayout());
|
||||
|
Reference in New Issue
Block a user