diff --git a/addons/search/plugin_search.cpp b/addons/search/plugin_search.cpp --- a/addons/search/plugin_search.cpp +++ b/addons/search/plugin_search.cpp @@ -720,16 +720,16 @@ attr->setBackground(replaceColor); if (activeView) { - attr->setForeground(activeView->defaultStyleAttribute(KTextEditor::dsNormal)->foreground().color()); + attr->setForeground(activeView->defaultStyleAttribute(KTextEditor::dsNormal)->selectedForeground().color()); } } else { QColor searchColor(Qt::yellow); if (ciface) searchColor = ciface->configValue(QStringLiteral("search-highlight-color")).value(); attr->setBackground(searchColor); if (activeView) { - attr->setForeground(activeView->defaultStyleAttribute(KTextEditor::dsNormal)->foreground().color()); + attr->setForeground(activeView->defaultStyleAttribute(KTextEditor::dsNormal)->selectedForeground().color()); } } // calculate end line in case of multi-line match