diff --git a/ChangeLog b/ChangeLog index 03c4ae7e..6548ec2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ * scintilla/LexMarkdown.cxx: Fix infinite loop in Markdown lexer (patch by Colomban Wendling, thanks). + * src/build.c: + Fix saving non-project filetype error regex. 2010-08-15 Enrico Tröger diff --git a/src/build.c b/src/build.c index 6a90c028..9f809f04 100644 --- a/src/build.c +++ b/src/build.c @@ -2569,12 +2569,12 @@ static void foreach_project_filetype(gpointer data, gpointer user_data) } +/* TODO: untyped ptr is too ugly (also for build_load_menu) */ void build_save_menu(GKeyFile *config, gpointer ptr, GeanyBuildSource src) { GeanyFiletype *ft; GeanyProject *pj; ForEachData data; - gchar *regkey; switch (src) { @@ -2584,12 +2584,10 @@ void build_save_menu(GKeyFile *config, gpointer ptr, GeanyBuildSource src) return; build_save_menu_grp(config, ft->homefilecmds, GEANY_GBG_FT, NULL); build_save_menu_grp(config, ft->homeexeccmds, GEANY_GBG_EXEC, NULL); - regkey = g_strdup_printf("%serror_regex", ft->name); if (NZV(ft->homeerror_regex_string)) - g_key_file_set_string(config, build_grp_name, regkey, ft->projerror_regex_string); + g_key_file_set_string(config, build_grp_name, "error_regex", ft->homeerror_regex_string); else - g_key_file_remove_key(config, build_grp_name, regkey, NULL); - g_free(regkey); + g_key_file_remove_key(config, build_grp_name, "error_regex", NULL); break; case GEANY_BCS_PREF: build_save_menu_grp(config, non_ft_pref, GEANY_GBG_NON_FT, NULL);