mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-27 15:54:17 +02:00
Fix FunctionList not refresh correctly on change of current doc's lang
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. In such a case a manual FL-reload/re-init was needed. Fix #16221, close #16245
This commit is contained in:
parent
a1f5405387
commit
829cd9d119
@ -6737,6 +6737,9 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
|
|||||||
else if (_subEditView.getCurrentBuffer() == buffer)
|
else if (_subEditView.getCurrentBuffer() == buffer)
|
||||||
_autoCompleteSub.setLanguage(buffer->getLangType());
|
_autoCompleteSub.setLanguage(buffer->getLangType());
|
||||||
|
|
||||||
|
if (_pFuncList && (!_pFuncList->isClosed()) && _pFuncList->isVisible())
|
||||||
|
_pFuncList->reload(); // sync FL with the current buffer lang
|
||||||
|
|
||||||
SCNotification scnN{};
|
SCNotification scnN{};
|
||||||
scnN.nmhdr.code = NPPN_LANGCHANGED;
|
scnN.nmhdr.code = NPPN_LANGCHANGED;
|
||||||
scnN.nmhdr.hwndFrom = _pPublicInterface->getHSelf();
|
scnN.nmhdr.hwndFrom = _pPublicInterface->getHSelf();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user