mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-26 23:34:44 +02:00
Fix normal.xml for Normal text auto-completion using not working issue
Fix #12325, close #13875
This commit is contained in:
parent
d9b98681f4
commit
ebdc910dcd
@ -1081,8 +1081,9 @@ void AutoCompletion::callTipClick(size_t direction)
|
|||||||
|
|
||||||
bool AutoCompletion::setLanguage(LangType language)
|
bool AutoCompletion::setLanguage(LangType language)
|
||||||
{
|
{
|
||||||
if (_curLang == language)
|
if (_curLang == language && _pXmlFile)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
_curLang = language;
|
_curLang = language;
|
||||||
|
|
||||||
TCHAR path[MAX_PATH];
|
TCHAR path[MAX_PATH];
|
||||||
@ -1092,7 +1093,8 @@ bool AutoCompletion::setLanguage(LangType language)
|
|||||||
wcscat_s(path, getApiFileName());
|
wcscat_s(path, getApiFileName());
|
||||||
wcscat_s(path, TEXT(".xml"));
|
wcscat_s(path, TEXT(".xml"));
|
||||||
|
|
||||||
delete _pXmlFile;
|
if (_pXmlFile)
|
||||||
|
delete _pXmlFile;
|
||||||
|
|
||||||
_pXmlFile = new TiXmlDocument(path);
|
_pXmlFile = new TiXmlDocument(path);
|
||||||
_funcCompletionActive = _pXmlFile->LoadFile();
|
_funcCompletionActive = _pXmlFile->LoadFile();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user