Commit d430a412 authored by mae's avatar mae
Browse files

fix uses selection (type with block and line numbers)

parent e4b0bd28
...@@ -938,7 +938,7 @@ static void highlightUses(QTextDocument *doc, ...@@ -938,7 +938,7 @@ static void highlightUses(QTextDocument *doc,
QTextEdit::ExtraSelection sel; QTextEdit::ExtraSelection sel;
sel.cursor = QTextCursor(doc); sel.cursor = QTextCursor(doc);
sel.cursor.setPosition(doc->findBlockByNumber(startLine - 1).position() + startColumn - 1); 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); QTextCursor::KeepAnchor);
sel.format = format; sel.format = format;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment