Update DocMap when setting user or external lexer

Closes #1050, fixes #1009
When setting the language to a user defined or external lexer, the DocMap
was not being refreshed to the new syntax.
This commit is contained in:
dail8859 2015-10-24 21:41:56 -04:00 committed by Don Ho
parent c2eb1e1919
commit 459d59f8ba

View File

@ -2679,10 +2679,18 @@ void Notepad_plus::command(int id)
TCHAR langName[langNameLenMax];
::GetMenuString(_mainMenuHandle, id, langName, langNameLenMax, MF_BYCOMMAND);
_pEditView->getCurrentBuffer()->setLangType(L_USER, langName);
if (_pDocMap)
{
_pDocMap->setSyntaxHiliting();
}
}
else if ((id >= IDM_LANG_EXTERNAL) && (id <= IDM_LANG_EXTERNAL_LIMIT))
{
setLanguage((LangType)(id - IDM_LANG_EXTERNAL + L_EXTERNAL));
if (_pDocMap)
{
_pDocMap->setSyntaxHiliting();
}
}
else if ((id >= ID_MACRO) && (id < ID_MACRO_LIMIT))
{