[BUG_FIXED] Fix external lexer plugin loading problem for Unicode Notepad++.
Add new plugin notification message NPPN_WORDSTYLESUPDATED. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@383 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
f7a1301d04
commit
44219af45d
@ -407,6 +407,10 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
|
|||||||
//scnNotification->nmhdr.hwndFrom = hwndNpp;
|
//scnNotification->nmhdr.hwndFrom = hwndNpp;
|
||||||
//scnNotification->nmhdr.idFrom = currentBufferID;
|
//scnNotification->nmhdr.idFrom = currentBufferID;
|
||||||
|
|
||||||
|
#define NPPN_WORDSTYLESUPDATED (NPPN_FIRST + 12) // To notify plugins that user initiated a WordStyleDlg change.
|
||||||
|
//scnNotification->nmhdr.code = NPPN_WORDSTYLESUPDATED;
|
||||||
|
//scnNotification->nmhdr.hwndFrom = hwndNpp;
|
||||||
|
//scnNotification->nmhdr.idFrom = currentBufferID;
|
||||||
|
|
||||||
|
|
||||||
#endif //NOTEPAD_PLUS_MSGS_H
|
#endif //NOTEPAD_PLUS_MSGS_H
|
||||||
|
@ -7804,6 +7804,13 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
|||||||
_subEditView.performGlobalStyles();
|
_subEditView.performGlobalStyles();
|
||||||
|
|
||||||
drawTabbarColoursFromStylerArray();
|
drawTabbarColoursFromStylerArray();
|
||||||
|
|
||||||
|
// Notify plugins of update to styles xml
|
||||||
|
SCNotification scnN;
|
||||||
|
scnN.nmhdr.code = NPPN_WORDSTYLESUPDATED;
|
||||||
|
scnN.nmhdr.hwndFrom = _hSelf;
|
||||||
|
scnN.nmhdr.idFrom = (uptr_t) _pEditView->getCurrentBufferID();
|
||||||
|
_pluginsManager.notify(&scnN);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3500,6 +3500,16 @@ void Editor::ClearAll() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Editor::ClearDocumentStyle() {
|
void Editor::ClearDocumentStyle() {
|
||||||
|
Decoration *deco = pdoc->decorations.root;
|
||||||
|
while (deco) {
|
||||||
|
// Save next in case deco deleted
|
||||||
|
Decoration *decoNext = deco->next;
|
||||||
|
if (deco->indicator < INDIC_CONTAINER) {
|
||||||
|
pdoc->decorations.SetCurrentIndicator(deco->indicator);
|
||||||
|
pdoc->DecorationFillRange(0, 0, pdoc->Length());
|
||||||
|
}
|
||||||
|
deco = decoNext;
|
||||||
|
}
|
||||||
pdoc->StartStyling(0, '\377');
|
pdoc->StartStyling(0, '\377');
|
||||||
pdoc->SetStyleFor(pdoc->Length(), 0);
|
pdoc->SetStyleFor(pdoc->Length(), 0);
|
||||||
cs.ShowAll();
|
cs.ShowAll();
|
||||||
|
Loading…
Reference in New Issue
Block a user