GNU bug report logs -
#69941
30.0.50; Faulty fontification of radio button widgets
Previous Next
Reported by: Stephen Berman <stephen.berman <at> gmx.net>
Date: Fri, 22 Mar 2024 15:01:01 UTC
Severity: normal
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #145 received at 69941-done <at> debbugs.gnu.org (full text, mbox):
On Sun, 9 Feb 2025 07:42:36 -0300 Mauro Aranda <maurooaranda <at> gmail.com> wrote:
> Stephen Berman <stephen.berman <at> gmx.net> writes:
>
>> On Sat, 8 Feb 2025 20:50:20 -0300 Mauro Aranda <maurooaranda <at> gmail.com>
> wrote:
>>> So, modifying an inactive widget right at the start or at the end of the
>>> overlay can produce this effect.
>>>
>>> I don't think we can solve it easily like my patch did with the :from
>>> and :to markers, though. But here's an idea:
>>>
>>> When a widget is already inactive (i.e., it has an :inactive property),
>>> instead of doing nothing we make sure to move the overlay so that it
>>> includes again all the widget, from the :from marker to the :to marker.
>>>
>>> If we do that, we should document that if some code modifies an
>>> :inactive widget, it has to call again :deactivate.
>>>
>>> I attach a patch with that idea, together with documentation changes and
>>> a new test.
>>
>> Thanks, I confirm this fixes the remaining misfontification. However,
>> if I switch the order of the last two lines above -- i.e, first
>> deactivate the radio widget and then set its value to the empty
>> string -- then I see the same misfontification of radio button "One"
>> that still occurs in emacs-30 (i.e. without both this patch and your
>> previous one). Is this expected, and if so, can you explain why?
>>
>
> Isn't that what I described? I mean, if you first deactivate and then
> you change the value, you're modifying an already inactive widget, and
> now the documentation says that if you do that, you should make sure the
> :deactivate function runs again...
Right, thanks. I was too eager to test your patch and just glanced at
your doc changes without really trying to understand them (or your
comments above). Sorry, mea culpa.
> Without my patches, it's a 2-headed bug:
> 1) The :from marker doesn't include the 1st button anymore. That's the
> bug my first patch solved.
> 2) The :inactive overlay doesn't include the 1st button anymore. That's
> the bug my second patch tries to solve.
Thanks, this helps my understanding further. (Nevertheless, much of the
Widget library remains a black box to me...)
Steve Berman
This bug report was last modified 82 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.