@techee commented on this pull request.


> @@ -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 https://github.com/geany/geany/pull/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 or view it on GitHub:
https://github.com/geany/geany/pull/3396#discussion_r1348978061
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3396/review/1662309...@github.com>

Reply via email to