Kaydet (Commit) 93d65a1d authored tarafından Nick Treleaven's avatar Nick Treleaven

Update styles when the filetype changes (based on patch by

Matthew Brush, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5654 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst bbe0472a
......@@ -4,6 +4,9 @@
Use STYLE_MAX instead of 127 for editor_set_font(). This fixes a
crash in the Split Window plugin when changing filetype (patch by
Matthew Brush, thanks; fixes #3255968).
* plugins/splitwindow.c:
Update styles when the filetype changes (based on patch by
Matthew Brush, thanks).
2011-03-30 Colomban Wendling <colomban(at)geany(dot)org>
......
......@@ -474,11 +474,21 @@ static void on_document_save(GObject *obj, GeanyDocument *doc, gpointer user_dat
}
static void on_document_filetype_set(GObject *obj, GeanyDocument *doc,
GeanyFiletype *filetype_old, gpointer user_data)
{
/* update styles */
if (edit_window.editor == doc->editor)
sync_to_current(edit_window.sci, doc->editor->sci);
}
PluginCallback plugin_callbacks[] =
{
{ "document-close", (GCallback) &on_document_close, FALSE, NULL },
{ "document-save", (GCallback) &on_document_save, FALSE, NULL },
{ NULL, NULL, FALSE, NULL }
{ "document-close", (GCallback) &on_document_close, FALSE, NULL },
{ "document-save", (GCallback) &on_document_save, FALSE, NULL },
{ "document-filetype-set", (GCallback) &on_document_filetype_set, FALSE, NULL },
{ NULL, NULL, FALSE, NULL }
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment