Simplify updating Scintilla keywords on reload config and tab switch.
commitb1b88286cf2c71a1be8e0bccc207063e93755bbd
authorMatthew Brush <matt@geany.org>
Thu, 20 Oct 2011 04:39:17 +0000 (19 21:39 -0700)
committerMatthew Brush <matt@geany.org>
Thu, 20 Oct 2011 04:39:17 +0000 (19 21:39 -0700)
treed5014f9e3b0faf9620d9e239bd1de562050b5272
parent6c8e80271e7307671b3ccb16552abf13924256c7
Simplify updating Scintilla keywords on reload config and tab switch.

Remove type keywords caching function since it doesn't really speed up
anything and we don't care if the keywords change since they can/should
still be reloaded.  This also prevents "leaking" a static GString once
when the application closes and saves a call to g_string_free() when the
type keywords have changed.

Rename document_update_highlighting() to document_update_type_keywords()
since no re-highlighting is needed when updating Scintilla keywords.
Scintilla highlights the new keywords automatically so this saves a call
to queue_colourise().

Remove update_type_keywords() function since this is now all handled
in the document_update_type_keywords() function.  This function had a
comment about updating all documents when sci is NULL but it was never
used in this way since it was only called on document_load_config() which
always operates on a single document and the sci should not be NULL.
src/callbacks.c
src/document.c
src/document.h