Debian Bug report logs -
#774747
"Match case" and "Replace all" settings are mistakenly checked by default due to uninitialized variables
Reply or subscribe to this bug.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Debian Xfce Maintainers <pkg-xfce-devel@lists.alioth.debian.org>:
Bug#774747; Package mousepad.
(Wed, 07 Jan 2015 05:03:06 GMT) (full text, mbox, link).
Acknowledgement sent
to Nachanon Vetjasit <nachanon.vetjasit@gmail.com>:
New Bug report received and forwarded. Copy sent to Debian Xfce Maintainers <pkg-xfce-devel@lists.alioth.debian.org>.
(Wed, 07 Jan 2015 05:03:06 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: mousepad
Version: 0.2.16-6
Severity: normal
Dear Maintainer,
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.
Regards,
Nachanon Vetjasit
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.
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Xfce Maintainers <pkg-xfce-devel@lists.alioth.debian.org>:
Bug#774747; Package mousepad.
(Wed, 07 Jan 2015 05:54:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Nachanon Vetjasit <nachanon.vetjasit@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Xfce Maintainers <pkg-xfce-devel@lists.alioth.debian.org>.
(Wed, 07 Jan 2015 05:54:04 GMT) (full text, mbox, link).
Message #10 received at 774747@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Control: tags -1 + patch
Dear Maintainer,
The attached patch fixes this issue, by explicitly initializing those
structure fields to zero (false) before loading the configuration file.
Note: This patch is tested against mousepad_0.2.16-6.
Regards,
Nachanon Vetjasit
[03_fix-search-settings.patch (text/x-patch, attachment)]
Added tag(s) patch.
Request was from Nachanon Vetjasit <nachanon.vetjasit@gmail.com>
to 774747-submit@bugs.debian.org.
(Wed, 07 Jan 2015 05:54:04 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Xfce Maintainers <pkg-xfce-devel@lists.alioth.debian.org>:
Bug#774747; Package mousepad.
(Thu, 08 Jan 2015 22:00:10 GMT) (full text, mbox, link).
Acknowledgement sent
to Yves-Alexis Perez <corsac@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Xfce Maintainers <pkg-xfce-devel@lists.alioth.debian.org>.
(Thu, 08 Jan 2015 22:00:10 GMT) (full text, mbox, link).
Message #17 received at 774747@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
On mer., 2015-01-07 at 12:51 +0700, Nachanon Vetjasit wrote:
> Dear Maintainer,
>
> The attached patch fixes this issue, by explicitly initializing those
> structure fields to zero (false) before loading the configuration
> file.
>
> Note: This patch is tested against mousepad_0.2.16-6.
Thanks, but Wheezy won't move (nor Jessie), so it's not really that
helpful :)
Regards,
--
Yves-Alexis
[signature.asc (application/pgp-signature, inline)]
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Fri Jan 5 05:13:03 2018;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.