Synchronize FunctionList panel with the current tab/buffer syntax set

Ensures automatic switching to the currently used tab/buffer lang.

Before, the FunctionList remained populated according to the previously used lang, even if the user switched to a different one (standard or UDL, it does not matter). In such a case a manual FL-reload/re-init was needed.
This commit is contained in:
xomx 2025-03-04 19:12:52 +01:00
parent 99d3f86d8b
commit 014e5e9b2d

View File

@ -6737,6 +6737,9 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
else if (_subEditView.getCurrentBuffer() == buffer)
_autoCompleteSub.setLanguage(buffer->getLangType());
if (_pFuncList)
_pFuncList->reload(); // sync FL with the current buffer lang
SCNotification scnN{};
scnN.nmhdr.code = NPPN_LANGCHANGED;
scnN.nmhdr.hwndFrom = _pPublicInterface->getHSelf();