Skip to content

Commit cc3d6a3

Browse files
committed
fix: Use selection background instead of underline for occurrences
This fixes Megaxela#11. This is only a workaround. The QFramedTextAttribute solution seems not possible, because we need to insert QChar::ObjectReplacementCharacter for every occurrence, thus ruin the undo history. It will be better if the user can set a custom color for this.
1 parent b09bbd3 commit cc3d6a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/internal/QCodeEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ void QCodeEditor::highlightOccurrences()
448448
{
449449
QTextEdit::ExtraSelection e;
450450
e.cursor = cursor;
451-
e.format.setFontUnderline(true);
451+
e.format.setBackground(m_syntaxStyle->getFormat("Selection").background());
452452
extra2.push_back(e);
453453
}
454454
cursor = doc->find(text, cursor, QTextDocument::FindWholeWords | QTextDocument::FindCaseSensitively);

0 commit comments

Comments
 (0)