Removing DocWatcher::NotifyLexerChanged

9 views
Skip to first unread message

Neil Hodgson

unread,
Sep 4, 2022, 7:33:34 PM9/4/22
to Scintilla mailing list
Way back, Scintilla used to allocate a limited number of styles by default but this would be expanded if a lexer required more styles. Currently, Scintilla always allocates all possible 256 style byte values.

A document to view notification was implemented so that when the lexer was changed, its number of styles was sent to each view which could then reallocate its styles. This is DocWatcher::NotifyLexerChanged. Since the maximum is now always allocated, it serves no purpose so I am proposing removing it and associated code.

This does not affect public APIs described in the Scintilla documentation. However, for Qt, the ScintillaEditDocument class defines a lexer_changed signal. Its also possible that an independent platform layer uses the notification.

Neil

Neil Hodgson

unread,
Sep 11, 2022, 8:04:34 PM9/11/22
to Scintilla mailing list
Me:

> ... it serves no purpose so I am proposing removing it and associated code.

This has been committed:
https://sourceforge.net/p/scintilla/code/ci/17313502831de0bbf2d6fd93847551c42b308bb7/

Neil

Reply all
Reply to author
Forward
0 new messages