@techee commented on this pull request.


In src/ui_utils.c:

> @@ -2133,7 +2132,8 @@ static void on_config_file_clicked(GtkWidget *widget, gpointer user_data)
 			g_file_get_contents(global_file, &global_content, NULL, NULL);
 
 		doc = document_new_file(utf8_filename, ft, global_content);
-		if (global_content)
+		// comment conf entries so we don't override defaults unnecessarily
+		if (g_str_has_suffix(file_name, ".conf") || (ft && ft->id == GEANY_FILETYPES_CONF))

Could you have a look if #3576 looks good to you? (I've just re-pushed it with a slightly modified version.)

I think the g_str_has_suffix(file_name, ".conf") check in your patch was unnecessary because such files should have the GEANY_FILETYPES_CONF filetype already. Also, I made the patch on top of the latest Geany code which was modified in the meantime with "smarter" conf file commenting mode where sections are preserved.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/3396/review/1662309310@github.com>