From 664d46084b797fd6af7dd0670a82c2ef9e716964 Mon Sep 17 00:00:00 2001 From: Shridhar Kumar <45252729+shriprem@users.noreply.github.com> Date: Wed, 27 Apr 2022 10:58:03 -0400 Subject: [PATCH] Override "current line indicator" style in "Search results" Fix #11596, close #11598 --- PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp index 609f01ee9..8ce7da911 100644 --- a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp @@ -2680,8 +2680,6 @@ void FindReplaceDlg::findAllIn(InWhat op) _pFinder->_scintView.execute(SCI_SETCODEPAGE, SC_CP_UTF8); _pFinder->_scintView.execute(SCI_USEPOPUP, FALSE); _pFinder->_scintView.execute(SCI_SETUNDOCOLLECTION, false); //dont store any undo information - _pFinder->_scintView.execute(SCI_SETCARETLINEVISIBLE, 1); - _pFinder->_scintView.execute(SCI_SETCARETLINEVISIBLEALWAYS, true); _pFinder->_scintView.execute(SCI_SETCARETWIDTH, 0); _pFinder->_scintView.showMargin(ScintillaEditView::_SC_MARGE_FOLDER, true); @@ -2814,8 +2812,6 @@ Finder * FindReplaceDlg::createFinder() pFinder->_scintView.execute(SCI_SETCODEPAGE, SC_CP_UTF8); pFinder->_scintView.execute(SCI_USEPOPUP, FALSE); pFinder->_scintView.execute(SCI_SETUNDOCOLLECTION, false); //dont store any undo information - pFinder->_scintView.execute(SCI_SETCARETLINEVISIBLE, 1); - pFinder->_scintView.execute(SCI_SETCARETLINEVISIBLEALWAYS, true); pFinder->_scintView.execute(SCI_SETCARETWIDTH, 0); pFinder->_scintView.showMargin(ScintillaEditView::_SC_MARGE_FOLDER, true); @@ -4329,7 +4325,9 @@ void Finder::setFinderStyle() const Style * pStyle = pStyler->findByID(SCE_SEARCHRESULT_CURRENT_LINE); if (pStyle) { - _scintView.execute(SCI_SETCARETLINEBACK, pStyle->_bgColor); + _scintView.execute(SCI_SETELEMENTCOLOUR, SC_ELEMENT_CARET_LINE_BACK, pStyle->_bgColor); + _scintView.execute(SCI_SETCARETLINEFRAME, 0); + _scintView.execute(SCI_SETCARETLINEVISIBLEALWAYS, true); } } _scintView.setSearchResultLexer();