mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-26 15:24:35 +02:00
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:
parent
c2eb1e1919
commit
459d59f8ba
@ -2679,10 +2679,18 @@ void Notepad_plus::command(int id)
|
|||||||
TCHAR langName[langNameLenMax];
|
TCHAR langName[langNameLenMax];
|
||||||
::GetMenuString(_mainMenuHandle, id, langName, langNameLenMax, MF_BYCOMMAND);
|
::GetMenuString(_mainMenuHandle, id, langName, langNameLenMax, MF_BYCOMMAND);
|
||||||
_pEditView->getCurrentBuffer()->setLangType(L_USER, langName);
|
_pEditView->getCurrentBuffer()->setLangType(L_USER, langName);
|
||||||
|
if (_pDocMap)
|
||||||
|
{
|
||||||
|
_pDocMap->setSyntaxHiliting();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ((id >= IDM_LANG_EXTERNAL) && (id <= IDM_LANG_EXTERNAL_LIMIT))
|
else if ((id >= IDM_LANG_EXTERNAL) && (id <= IDM_LANG_EXTERNAL_LIMIT))
|
||||||
{
|
{
|
||||||
setLanguage((LangType)(id - IDM_LANG_EXTERNAL + L_EXTERNAL));
|
setLanguage((LangType)(id - IDM_LANG_EXTERNAL + L_EXTERNAL));
|
||||||
|
if (_pDocMap)
|
||||||
|
{
|
||||||
|
_pDocMap->setSyntaxHiliting();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ((id >= ID_MACRO) && (id < ID_MACRO_LIMIT))
|
else if ((id >= ID_MACRO) && (id < ID_MACRO_LIMIT))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user