mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-26 23:34:44 +02:00
Fix tab settings for external lexers cannot be saved issue
Allows the configuration of tab settings for external lexers to be saved through the sessions. Fix #16460, close #16461
This commit is contained in:
parent
cfbb4de52a
commit
0ffd606053
@ -8610,6 +8610,26 @@ bool NppParameters::insertTabInfo(const wchar_t* langName, int tabInfo, bool bac
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (size_t x = 0; x < _pXmlExternalLexerDoc.size(); ++x)
|
||||||
|
{
|
||||||
|
TiXmlNode* langRoot = (_pXmlExternalLexerDoc[x]->FirstChild(L"NotepadPlus"))->FirstChildElement(L"Languages");
|
||||||
|
for (TiXmlNode* childNode = langRoot->FirstChildElement(L"Language");
|
||||||
|
childNode;
|
||||||
|
childNode = childNode->NextSibling(L"Language"))
|
||||||
|
{
|
||||||
|
TiXmlElement* element = childNode->ToElement();
|
||||||
|
const wchar_t* nm = element->Attribute(L"name");
|
||||||
|
if (nm && lstrcmp(langName, nm) == 0)
|
||||||
|
{
|
||||||
|
childNode->ToElement()->SetAttribute(L"tabSettings", tabInfo);
|
||||||
|
childNode->ToElement()->SetAttribute(L"backspaceUnindent", backspaceUnindent ? L"yes" : L"no");
|
||||||
|
_pXmlExternalLexerDoc[x]->SaveFile();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user