Commit 5e449a80 authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

Fixed diagnostic underlining to take the location length into account.

Done-with: Christian Kamm
parent b17fc903
......@@ -1122,10 +1122,15 @@ static void appendExtraSelectionsForMessages(
sel.cursor = c;
sel.cursor.setPosition(c.position() + column - 1);
if (d.loc.length == 0) {
if (sel.cursor.atBlockEnd())
sel.cursor.movePosition(QTextCursor::StartOfWord, QTextCursor::KeepAnchor);
sel.cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
} else {
sel.cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, d.loc.length);
if (d.isWarning())
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