mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 05:45:00 +02:00
Fix "Follow Windows" option makes external lexers show twice in tab settings
Fix #16462
This commit is contained in:
parent
a6cd3de8a7
commit
f234207f5d
@ -287,7 +287,7 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const wchar_t *cmdL
|
|||||||
if (doesFileExist(themePath.c_str()))
|
if (doesFileExist(themePath.c_str()))
|
||||||
{
|
{
|
||||||
nppGUI._themeName.assign(themePath);
|
nppGUI._themeName.assign(themePath);
|
||||||
nppParams.reloadStylers(themePath.c_str());
|
nppParams.reloadStylers(themePath.c_str(), false);
|
||||||
::SendMessage(_hSelf, WM_UPDATESCINTILLAS, TRUE, 0);
|
::SendMessage(_hSelf, WM_UPDATESCINTILLAS, TRUE, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1043,7 +1043,7 @@ NppParameters::~NppParameters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool NppParameters::reloadStylers(const wchar_t* stylePath)
|
bool NppParameters::reloadStylers(const wchar_t* stylePath, bool doReloadLexerPlugins /*= true*/)
|
||||||
{
|
{
|
||||||
delete _pXmlUserStylerDoc;
|
delete _pXmlUserStylerDoc;
|
||||||
|
|
||||||
@ -1077,9 +1077,12 @@ bool NppParameters::reloadStylers(const wchar_t* stylePath)
|
|||||||
getUserStylersFromXmlTree();
|
getUserStylersFromXmlTree();
|
||||||
|
|
||||||
// Reload plugin styles.
|
// Reload plugin styles.
|
||||||
for ( size_t i = 0; i < getExternalLexerDoc()->size(); ++i)
|
if (doReloadLexerPlugins)
|
||||||
{
|
{
|
||||||
getExternalLexerFromXmlTree( getExternalLexerDoc()->at(i) );
|
for (size_t i = 0; i < getExternalLexerDoc()->size(); ++i)
|
||||||
|
{
|
||||||
|
getExternalLexerFromXmlTree(getExternalLexerDoc()->at(i));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1524,7 +1524,7 @@ public:
|
|||||||
|
|
||||||
bool load();
|
bool load();
|
||||||
bool reloadLang();
|
bool reloadLang();
|
||||||
bool reloadStylers(const wchar_t *stylePath = nullptr);
|
bool reloadStylers(const wchar_t* stylePath = nullptr, bool doReloadLexerPlugins = true);
|
||||||
void destroyInstance();
|
void destroyInstance();
|
||||||
std::wstring getSettingsFolder();
|
std::wstring getSettingsFolder();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user