[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [PATCH] toggle for the key rebound in rcfile is uniniti
Re: [Nano-devel] [PATCH] toggle for the key rebound in rcfile is uninitialized
Sat, 6 Aug 2016 14:07:10 +0530
On Fri, Aug 5, 2016 at 2:05 PM, Benno Schulenberg
> If it didn't already have the correct value, it would mean that rebinding
> toggles wouldn't be working at all (or not correctly) without your patch.
For a second ( or a millisecond), I too had thought, what you said.
But I was stupid enough to not to pay attention to it.
> When there's an unitialized value, all it needs is to initialize the value.
> That requires a single instruction, one assignment, in the right place,
> and that is not in src/rcfile.c. Try again.
So, code is already assigning toggle, but only for the shortcuts that
were not "do_toggle_void". So, this patch sets the (default) value of
s->toggle to zero (which holds true for the "non-do_toggle_void"
shortcuts) at the beginning of function strtosc(); if shortcut is
do_toggle_void, toggle value gets overwritten naturally.
Description: Text Data