diff --git a/PowerEditor/src/Notepad_plus_Window.cpp b/PowerEditor/src/Notepad_plus_Window.cpp index 37810da78..0e6653680 100644 --- a/PowerEditor/src/Notepad_plus_Window.cpp +++ b/PowerEditor/src/Notepad_plus_Window.cpp @@ -287,7 +287,7 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const wchar_t *cmdL if (doesFileExist(themePath.c_str())) { nppGUI._themeName.assign(themePath); - nppParams.reloadStylers(themePath.c_str(), false); + nppParams.reloadStylers(themePath.c_str()); ::SendMessage(_hSelf, WM_UPDATESCINTILLAS, TRUE, 0); } } diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index bc354b8ec..c0b8acc87 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -1043,7 +1043,7 @@ NppParameters::~NppParameters() } -bool NppParameters::reloadStylers(const wchar_t* stylePath, bool doReloadLexerPlugins /*= true*/) +bool NppParameters::reloadStylers(const wchar_t* stylePath) { delete _pXmlUserStylerDoc; @@ -1077,12 +1077,9 @@ bool NppParameters::reloadStylers(const wchar_t* stylePath, bool doReloadLexerPl getUserStylersFromXmlTree(); // Reload plugin styles. - if (doReloadLexerPlugins) + for ( size_t i = 0; i < getExternalLexerDoc()->size(); ++i) { - for (size_t i = 0; i < getExternalLexerDoc()->size(); ++i) - { - getExternalLexerFromXmlTree(getExternalLexerDoc()->at(i)); - } + getExternalLexerFromXmlTree( getExternalLexerDoc()->at(i) ); } return true; } diff --git a/PowerEditor/src/Parameters.h b/PowerEditor/src/Parameters.h index 4c5f050a2..5bdd09365 100644 --- a/PowerEditor/src/Parameters.h +++ b/PowerEditor/src/Parameters.h @@ -1524,7 +1524,7 @@ public: bool load(); bool reloadLang(); - bool reloadStylers(const wchar_t* stylePath = nullptr, bool doReloadLexerPlugins = true); + bool reloadStylers(const wchar_t *stylePath = nullptr); void destroyInstance(); std::wstring getSettingsFolder();