diff --git a/plugins/contextbrowser/contextbrowser.cpp b/plugins/contextbrowser/contextbrowser.cpp --- a/plugins/contextbrowser/contextbrowser.cpp +++ b/plugins/contextbrowser/contextbrowser.cpp @@ -654,7 +654,8 @@ if( !m_highlightAttribute ) { m_highlightAttribute = Attribute::Ptr( new Attribute() ); m_highlightAttribute->setDefaultStyle(KTextEditor::dsNormal); - m_highlightAttribute->setForeground(m_highlightAttribute->selectedForeground()); + auto foreground = view->defaultStyleAttribute(KTextEditor::dsNormal)->selectedForeground().color(); + m_highlightAttribute->setForeground(foreground); m_highlightAttribute->setBackgroundFillWhitespace(true); auto iface = qobject_cast(view);