From 34e537a06349e66f674b08ca0b36b694cd53e650 Mon Sep 17 00:00:00 2001 From: Artem Sokolovskii Date: Tue, 19 Dec 2023 16:08:05 +0100 Subject: [PATCH] ClangFormat: Fix formatting for LineEnding CRLF Change-Id: I10abc07f5d178a7114faba7174ea1bfc80965174 Reviewed-by: David Schulz Reviewed-by: --- src/plugins/clangformat/clangformatbaseindenter.cpp | 1 + 1 file changed, 1 insertion(+) 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;