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).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5653 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2011-03-30 12:20:18 +00:00
parent 417adeb302
commit bbe0472a0d
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2011-03-30 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/editor.c:
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).
2011-03-30 Colomban Wendling <colomban(at)geany(dot)org>
* src/plugindata.h, src/pluginprivate.h, src/plugins.c,

View File

@ -4478,7 +4478,7 @@ void editor_set_font(GeanyEditor *editor, const gchar *font)
font_name = g_strdup_printf("!%s", pango_font_description_get_family(pfd));
pango_font_description_free(pfd);
for (style = 0; style <= 127; style++)
for (style = 0; style <= STYLE_MAX; style++)
sci_set_font(editor->sci, style, font_name, size);
/* line number and braces */