diff --git a/PowerEditor/src/NppBigSwitch.cpp b/PowerEditor/src/NppBigSwitch.cpp index 1802c435..b89c2222 100644 --- a/PowerEditor/src/NppBigSwitch.cpp +++ b/PowerEditor/src/NppBigSwitch.cpp @@ -1415,47 +1415,47 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa (NppParameters::getInstance())->setCurrentDefaultBgColor(style._bgColor); // Set default fg/bg colors on internal docking dialog - if (_pFuncList && _pFuncList->isCreated() && _pFuncList->isVisible()) + if (_pFuncList) { _pFuncList->setBackgroundColor(style._bgColor); _pFuncList->setForegroundColor(style._fgColor); } - if (_pAnsiCharPanel && _pAnsiCharPanel->isCreated() && _pAnsiCharPanel->isVisible()) + if (_pAnsiCharPanel) { _pAnsiCharPanel->setBackgroundColor(style._bgColor); _pAnsiCharPanel->setForegroundColor(style._fgColor); } - if (_pFileSwitcherPanel && _pFileSwitcherPanel->isCreated() && _pFileSwitcherPanel->isVisible()) + if (_pFileSwitcherPanel) { _pFileSwitcherPanel->setBackgroundColor(style._bgColor); _pFileSwitcherPanel->setForegroundColor(style._fgColor); } - if (_pClipboardHistoryPanel && _pClipboardHistoryPanel->isCreated() && _pClipboardHistoryPanel->isVisible()) + if (_pClipboardHistoryPanel) { _pClipboardHistoryPanel->setBackgroundColor(style._bgColor); _pClipboardHistoryPanel->setForegroundColor(style._fgColor); _pClipboardHistoryPanel->redraw(true); } - if (_pProjectPanel_1 && _pProjectPanel_1->isCreated() && _pProjectPanel_1->isVisible()) + if (_pProjectPanel_1) { _pProjectPanel_1->setBackgroundColor(style._bgColor); _pProjectPanel_1->setForegroundColor(style._fgColor); } - if (_pProjectPanel_2 && _pProjectPanel_2->isCreated() && _pProjectPanel_2->isVisible()) + if (_pProjectPanel_2) { _pProjectPanel_2->setBackgroundColor(style._bgColor); _pProjectPanel_2->setForegroundColor(style._fgColor); } - if (_pProjectPanel_3 && _pProjectPanel_3->isCreated() && _pProjectPanel_3->isVisible()) + if (_pProjectPanel_3) { _pProjectPanel_3->setBackgroundColor(style._bgColor); _pProjectPanel_3->setForegroundColor(style._fgColor); } - if (_pDocMap && _pDocMap->isCreated() && _pDocMap->isVisible()) + if (_pDocMap) { _pDocMap->setSyntaxHiliting(); } diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index 4721498d..28ea605a 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -2528,8 +2528,19 @@ void Finder::setFinderStyle() _scintView.execute(SCI_SETCARETLINEBACK, style._bgColor); } } - _scintView.setSearchResultLexer(); + + // Override foreground & background colour by default foreground & background coulour + StyleArray & stylers = _scintView._pParameter->getMiscStylerArray(); + int iStyleDefault = stylers.getStylerIndexByID(STYLE_DEFAULT); + if (iStyleDefault != -1) + { + Style & styleDefault = stylers.getStyler(iStyleDefault); + _scintView.setStyle(styleDefault); + _scintView.execute(SCI_STYLESETFORE, SCE_SEARCHRESULT_DEFAULT, styleDefault._fgColor); + _scintView.execute(SCI_STYLESETBACK, SCE_SEARCHRESULT_DEFAULT, styleDefault._bgColor); + } + _scintView.execute(SCI_COLOURISE, 0, -1); } diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index b640e405..4d263d94 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -2095,7 +2095,6 @@ void ScintillaEditView::performGlobalStyles() activeFoldFgColor = style._fgColor; } - ScintillaViewParams & svp = (ScintillaViewParams &)_pParameter->getSVP(); for (int j = 0 ; j < NB_FOLDER_STATE ; ++j) defineMarker(_markersArray[FOLDER_TYPE][j], _markersArray[svp._folderStyle][j], foldfgColor, foldbgColor, activeFoldFgColor); @@ -2750,13 +2749,6 @@ void ScintillaEditView::hideLines() { _currentBuffer->setHideLineChanged(true, startLine-1); } -void ScintillaEditView::setHiLiteResultWords(const TCHAR *keywords) -{ - WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance(); - const char * word2search = wmc->wchar2char(keywords, CP_ACP); - setKeywords(L_SEARCHRESULT, word2search, 0); -} - bool ScintillaEditView::markerMarginClick(int lineNumber) { int state = execute(SCI_MARKERGET, lineNumber); diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h index fea3ba7c..265b822c 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h @@ -618,7 +618,7 @@ public: previousSelRange = currentSelRange; return false; }; - void setHiLiteResultWords(const TCHAR *keywords); + void defineDocType(LangType typeDoc); //setup stylers for active document void mouseWheel(WPARAM wParam, LPARAM lParam) { scintillaNew_Proc(_hSelf, WM_MOUSEWHEEL, wParam, lParam);