forked from qt-creator/qt-creator
Utils: Fix column returned from helper function
The second function overload must also return 1-based column. Change-Id: I1d3a58c9267e4a8c8a031c72230f963596a7bb2b Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -53,7 +53,7 @@ OptionalLineColumn convertPosition(const QTextDocument *document, int pos)
|
||||
QTextBlock block = document->findBlock(pos);
|
||||
|
||||
if (block.isValid())
|
||||
optional.emplace(block.blockNumber() + 1, pos - block.position());
|
||||
optional.emplace(block.blockNumber() + 1, pos - block.position() + 1);
|
||||
|
||||
return optional;
|
||||
}
|
||||
|
Reference in New Issue
Block a user