forked from qt-creator/qt-creator
ClangFormat: Fix utf8 symbol indentation
Fixes: QTCREATORBUG-29927 Change-Id: I5a5a326e13cbe3a874a66e275ded0c6dea9964d7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -316,8 +316,10 @@ int forceIndentWithExtraText(QByteArray &buffer,
|
||||
// A comment at the end of the line appears to prevent clang-format from removing line breaks.
|
||||
if (dummyText == "/*//*/" || dummyText.isEmpty()) {
|
||||
if (block.previous().isValid()) {
|
||||
const int prevEndOffset = Utils::Text::utf8NthLineOffset(block.document(), buffer,
|
||||
block.blockNumber()) + block.previous().text().length();
|
||||
const int prevEndOffset = Utils::Text::utf8NthLineOffset(block.document(),
|
||||
buffer,
|
||||
block.blockNumber())
|
||||
+ block.previous().text().toUtf8().length();
|
||||
buffer.insert(prevEndOffset, " //");
|
||||
extraLength += 3;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user