mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-27 07:44:24 +02:00
Fix "User-defined keywords" not being saved properly (Style Config)
When "User-defined keywords" field has been set keywords, removing all keywords then saving doesn't have any change (the keywords are kept after saving). The commit fix it. Fix #15543, fix #14303
This commit is contained in:
parent
9e4290094d
commit
c1954e5c44
@ -8490,15 +8490,13 @@ void NppParameters::writeStyle2Element(const Style & style2Write, Style & style2
|
||||
}
|
||||
|
||||
|
||||
if (!style2Write._keywords.empty())
|
||||
{
|
||||
TiXmlNode *teteDeNoeud = element->LastChild();
|
||||
TiXmlNode *teteDeNoeud = element->LastChild();
|
||||
|
||||
if (teteDeNoeud)
|
||||
teteDeNoeud->SetValue(style2Write._keywords.c_str());
|
||||
else
|
||||
element->InsertEndChild(TiXmlText(style2Write._keywords.c_str()));
|
||||
|
||||
if (teteDeNoeud)
|
||||
teteDeNoeud->SetValue(style2Write._keywords.c_str());
|
||||
else
|
||||
element->InsertEndChild(TiXmlText(style2Write._keywords.c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
void NppParameters::insertUserLang2Tree(TiXmlNode *node, UserLangContainer *userLang)
|
||||
|
Loading…
x
Reference in New Issue
Block a user