From 459d59f8bae1ec47f7cc45c1e7e3fba9475a01d3 Mon Sep 17 00:00:00 2001 From: dail8859 Date: Sat, 24 Oct 2015 21:41:56 -0400 Subject: [PATCH] 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. --- PowerEditor/src/NppCommands.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 688bffc5..527d2046 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -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)) {