[Pkg-xfce-devel] Bug#774747: "Match case" and "Replace all" settings are mistakenly checked by default due to uninitialized variables
nachanon.vetjasit at gmail.com
Wed Jan 7 04:58:12 UTC 2015
It seems that Mousepad always select "Match case" option when user tries
to activate Find dialog (Search > Find), and also "Replace all" option
in Replace dialog (Search > Replace), by default.
This causes inconvenience, since most user are probably not serious about
case-matching for a general text search. And for replacing all by default,
user will not have any chance to review the changes first.
Leafpad (which Mousepad forked from), and Pluma/GEdit deselect
these option by default.
But as I digged into Mousepad source code, it seems that these behavior
are unintentional, as in `src/main.c` function `create_new_process()`
which creates configuration data structure, and in function
`load_config_file()` which loads configuration file, did not make
any attempt to initialize gboolean `StructData.search.match_case` and
`StructData.search.replace_all` field, leaving them in random value
(mostly nonzero), causing those "Match case" and "Replace all" checkbox
to be mistakenly checked every time Mousepad starts.
P.S. This bug may or may not apply to Debian Jessie version of Mousepad
(0.3.0) since their code are a significantly different.
More information about the Pkg-xfce-devel