forked from qt-creator/qt-creator
CppEditor: Fix "SelectBlockUp" for string literals
Literal::size() is the number of chars used internally, not necessarily the number of logical characters. Fixes: QTCREATORBUG-29844 Change-Id: I74431a2f3f533482567c3774f09deb44dc83d9f0 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -546,7 +546,7 @@ void CppSelectionChanger::fineTuneASTNodePositions(ASTNodePositions &positions)
|
||||
|
||||
// Start position will be the end position minus the size of the actual contents of the
|
||||
// literal.
|
||||
int newPosStart = newPosEnd - firstToken.string->size();
|
||||
int newPosStart = newPosEnd - QString::fromUtf8(firstToken.string->chars()).size();
|
||||
|
||||
// Skip raw literal parentheses.
|
||||
if (isRawLiteral)
|
||||
|
||||
Reference in New Issue
Block a user