Before the user would sometimes have to override `UnwantedFiletype=` in the user config file to remove an extension written in the system file. Geany would ignore an overridden filetype in the user config file that also matches the extension. This happened when the wanted filetype had a higher index than the unwanted one in `filetypes_array`.
This also first refactors the code without `filetypes_find` (which I wrote ages ago) - It's not worth abstracting finding through `filetypes_array`, it's not bug prone, and it may even cause bugs with non-type-safe predicate signature. It was only used once anyway. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2166
-- Commit Summary --
* Kill filetypes_find(), rename static function * Always allow user filetype extensions to override system config file
-- File Changes --
M src/filetypes.c (48) M src/filetypes.h (3) M src/filetypesprivate.h (1)
-- Patch Links --
https://github.com/geany/geany/pull/2166.patch https://github.com/geany/geany/pull/2166.diff
Note that #2167 changes the logic again, so you might rather just review that ;-)
Merged #2166 into master.
Oops, I should have chosen *rebase and merge*, sorry.
github-comments@lists.geany.org