Right now, when a config file from Tools->Configuration Files is edited for the first time, the global config file is taken and all lines in it are commented-out. When modified, such a file is copied into the user's config directory. The logic behind this is that the user typically wants to modify just one or few config options while leaving the rest in the default state.

However, commenting-out all lines is problemmatic. Consider for instance the beginning of filetypes.common when all lines are commented-out by the current code:

#~ # For complete documentation of this file, please see Geany's main documentation
#~ [styling]
#~ # use foreground;background;bold;italic or named_style,bold,italic
#~
#~ # used for filetype All/None
#~ #default=default
  1. Already commented-out lines are commented out once more which is ugly
  2. Sections are commented out. This is problematic because users don't have to just comment-out the variable they want to modify, they must also comment-out the section in which the variable is which is easy to forget.
  3. Empty lines are commented out which is unnecessary

This patch goes through the config file line by line and keeps sections, comments and empty lines unmodified so the result of the above example is this:

# For complete documentation of this file, please see Geany's main documentation
[styling]
# use foreground;background;bold;italic or named_style,bold,italic

# used for filetype All/None
#default=default

The patch does this only for .conf filetype and uses the original code for other file types.


You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/3413

Commit Summary

File Changes

(1 file)

Patch Links:


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/3413@github.com>