Revert "Fix "Follow Windows" option makes external lexers show twice in tab settings"

Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/16462#issuecomment-3079457421

This reverts commit f234207f5dd8f45ecd97cb08a21aa993e7469b65.
This commit is contained in:
Don Ho 2025-07-16 22:11:56 +02:00
parent f234207f5d
commit e8b93575be
3 changed files with 5 additions and 8 deletions

View File

@ -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);
}
}

View File

@ -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,13 +1077,10 @@ bool NppParameters::reloadStylers(const wchar_t* stylePath, bool doReloadLexerPl
getUserStylersFromXmlTree();
// Reload plugin styles.
if (doReloadLexerPlugins)
{
for ( size_t i = 0; i < getExternalLexerDoc()->size(); ++i)
{
getExternalLexerFromXmlTree( getExternalLexerDoc()->at(i) );
}
}
return true;
}

View File

@ -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();