diff --git a/src/plugins/clangformat/clangformatbaseindenter.cpp b/src/plugins/clangformat/clangformatbaseindenter.cpp index fcd8b799a41..158d0c48cac 100644 --- a/src/plugins/clangformat/clangformatbaseindenter.cpp +++ b/src/plugins/clangformat/clangformatbaseindenter.cpp @@ -392,6 +392,7 @@ Utils::ChangeSet convertReplacements(const QTextDocument *doc, .size(); QString replacementText = QString::fromStdString(replacement.getReplacementText().str()); + replacementText.replace("\r", ""); auto sameCharAt = [&](int replacementOffset) { if (replacementText.size() <= replacementOffset || replacementOffset < 0) return false;