From d430a4123bef14c5ae82c18516d90001cb1e5dbd Mon Sep 17 00:00:00 2001
From: mae <qt-info@nokia.com>
Date: Wed, 8 Jul 2009 16:38:00 +0200
Subject: [PATCH] fix uses selection (type with block and line numbers)

---
 src/plugins/cppeditor/cppeditor.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp
index e1b199661f2..745c22cae4c 100644
--- a/src/plugins/cppeditor/cppeditor.cpp
+++ b/src/plugins/cppeditor/cppeditor.cpp
@@ -938,7 +938,7 @@ static void highlightUses(QTextDocument *doc,
             QTextEdit::ExtraSelection sel;
             sel.cursor = QTextCursor(doc);
             sel.cursor.setPosition(doc->findBlockByNumber(startLine - 1).position() + startColumn - 1);
-            sel.cursor.setPosition(doc->findBlockByLineNumber(endLine - 1).position() + endColumn - 1,
+            sel.cursor.setPosition(doc->findBlockByNumber(endLine - 1).position() + endColumn - 1,
                                    QTextCursor::KeepAnchor);
             sel.format = format;
 
-- 
GitLab