diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 3d0d6c6f1..617bce302 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -4631,7 +4631,7 @@ void Notepad_plus::notifyBufferActivated(BufferID bufid, int view) if (_pDocMap && (!_pDocMap->isClosed()) && _pDocMap->isVisible()) { _pDocMap->reloadMap(); - _pDocMap->setSyntaxLiliting(); + _pDocMap->setSyntaxHiliting(); } if (_pFuncList && (!_pFuncList->isClosed()) && _pFuncList->isVisible()) diff --git a/PowerEditor/src/NppBigSwitch.cpp b/PowerEditor/src/NppBigSwitch.cpp index 03d535daa..1802c4359 100644 --- a/PowerEditor/src/NppBigSwitch.cpp +++ b/PowerEditor/src/NppBigSwitch.cpp @@ -1398,9 +1398,11 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa { //reset styler for change in Stylers.xml _mainEditView.defineDocType(_mainEditView.getCurrentBuffer()->getLangType()); - _subEditView.defineDocType(_subEditView.getCurrentBuffer()->getLangType()); _mainEditView.performGlobalStyles(); + + _subEditView.defineDocType(_subEditView.getCurrentBuffer()->getLangType()); _subEditView.performGlobalStyles(); + _findReplaceDlg.updateFinderScintilla(); drawTabbarColoursFromStylerArray(); @@ -1413,45 +1415,50 @@ 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) + if (_pFuncList && _pFuncList->isCreated() && _pFuncList->isVisible()) { _pFuncList->setBackgroundColor(style._bgColor); _pFuncList->setForegroundColor(style._fgColor); } - if (_pAnsiCharPanel) + if (_pAnsiCharPanel && _pAnsiCharPanel->isCreated() && _pAnsiCharPanel->isVisible()) { _pAnsiCharPanel->setBackgroundColor(style._bgColor); _pAnsiCharPanel->setForegroundColor(style._fgColor); } - if (_pFileSwitcherPanel) + if (_pFileSwitcherPanel && _pFileSwitcherPanel->isCreated() && _pFileSwitcherPanel->isVisible()) { _pFileSwitcherPanel->setBackgroundColor(style._bgColor); _pFileSwitcherPanel->setForegroundColor(style._fgColor); } - if (_pClipboardHistoryPanel) + if (_pClipboardHistoryPanel && _pClipboardHistoryPanel->isCreated() && _pClipboardHistoryPanel->isVisible()) { _pClipboardHistoryPanel->setBackgroundColor(style._bgColor); _pClipboardHistoryPanel->setForegroundColor(style._fgColor); + _pClipboardHistoryPanel->redraw(true); } - if (_pProjectPanel_1) + if (_pProjectPanel_1 && _pProjectPanel_1->isCreated() && _pProjectPanel_1->isVisible()) { _pProjectPanel_1->setBackgroundColor(style._bgColor); _pProjectPanel_1->setForegroundColor(style._fgColor); } - if (_pProjectPanel_2) + if (_pProjectPanel_2 && _pProjectPanel_2->isCreated() && _pProjectPanel_2->isVisible()) { _pProjectPanel_2->setBackgroundColor(style._bgColor); _pProjectPanel_2->setForegroundColor(style._fgColor); } - if (_pProjectPanel_3) + if (_pProjectPanel_3 && _pProjectPanel_3->isCreated() && _pProjectPanel_3->isVisible()) { _pProjectPanel_3->setBackgroundColor(style._bgColor); _pProjectPanel_3->setForegroundColor(style._fgColor); } + if (_pDocMap && _pDocMap->isCreated() && _pDocMap->isVisible()) + { + _pDocMap->setSyntaxHiliting(); + } // Notify plugins of update to styles xml SCNotification scnN; diff --git a/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.h b/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.h index 9066212cf..0d45bfb20 100644 --- a/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.h +++ b/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.h @@ -64,9 +64,11 @@ public: virtual void setBackgroundColor(int bgColour) const { ListView_SetBkColor(_listView.getHSelf(), bgColour); ListView_SetTextBkColor(_listView.getHSelf(), bgColour); + _listView.redraw(true); }; virtual void setForegroundColor(int fgColour) const { ListView_SetTextColor(_listView.getHSelf(), fgColour); + _listView.redraw(true); }; protected: diff --git a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp index 210ca31fb..5ff15738d 100644 --- a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp +++ b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp @@ -35,7 +35,6 @@ void DocumentMap::reloadMap() { if (_pScintillaEditView && _ppEditView) { - Document currentDoc = (*_ppEditView)->execute(SCI_GETDOCPOINTER); _pScintillaEditView->execute(SCI_SETDOCPOINTER, 0, (LPARAM)currentDoc); @@ -61,7 +60,7 @@ void DocumentMap::reloadMap() } } -void DocumentMap::setSyntaxLiliting() +void DocumentMap::setSyntaxHiliting() { Buffer *buf = _pScintillaEditView->getCurrentBuffer(); _pScintillaEditView->defineDocType(buf->getLangType()); @@ -253,6 +252,10 @@ void DocumentMap::scrollMap(bool direction, moveMode whichMode) scrollMap(); } +void DocumentMap::redraw(bool) const +{ + _pScintillaEditView->execute(SCI_COLOURISE, 0, -1); +} BOOL CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { @@ -275,7 +278,7 @@ BOOL CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara _vzDlg.doDialog(); (NppParameters::getInstance())->SetTransparent(_vzDlg.getHSelf(), 50); // 0 <= transparancy < 256 - setSyntaxLiliting(); + setSyntaxHiliting(); _pScintillaEditView->showMargin(0, false); _pScintillaEditView->showMargin(1, false); @@ -319,7 +322,7 @@ BOOL CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara { _vzDlg.display(); reloadMap(); - setSyntaxLiliting(); + setSyntaxHiliting(); return TRUE; } diff --git a/PowerEditor/src/WinControls/DocumentMap/documentMap.h b/PowerEditor/src/WinControls/DocumentMap/documentMap.h index 380517996..d2361e346 100644 --- a/PowerEditor/src/WinControls/DocumentMap/documentMap.h +++ b/PowerEditor/src/WinControls/DocumentMap/documentMap.h @@ -112,6 +112,8 @@ public: _vzDlg.display(); }; + virtual void redraw(bool forceUpdate = false) const; + void setParent(HWND parent2set){ _hParent = parent2set; }; @@ -128,7 +130,7 @@ public: void doMove(); void fold(int line, bool foldOrNot); void foldAll(bool mode); - void setSyntaxLiliting(); + void setSyntaxHiliting(); protected: virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.h b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.h index 88237d534..50884ac70 100644 --- a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.h +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.h @@ -74,10 +74,12 @@ public: void setBackgroundColor(COLORREF bgColour) { ListView_SetBkColor(_hSelf, bgColour); ListView_SetTextBkColor(_hSelf, bgColour); + redraw(true); }; void setForegroundColor(COLORREF fgColour) { ListView_SetTextColor(_hSelf, fgColour); + redraw(true); }; protected: