mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
Call option_changed() on two more appropriate places
This should fix the bug with toggled options not getting saved, and changehooks wouldn't be called on certain circumstances (if there were any to be called, anyway - but it is more correct now).
This commit is contained in:
parent
d34fe568cd
commit
4ce737379f
@ -956,6 +956,7 @@ toggle_option(struct session *ses, struct option *option)
|
||||
|
||||
/* TODO: call change hooks. --jonas */
|
||||
option->value.number = (number <= option->max) ? number : option->min;
|
||||
option_changed(ses, option, option);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1330,7 +1330,7 @@ text_typeahead_handler(struct input_line *line, int action_id)
|
||||
|
||||
opt->value.number = (opt->value.number + 1)
|
||||
% (opt->max + 1);
|
||||
opt->flags |= OPT_TOUCHED;
|
||||
option_changed(ses, opt, opt);
|
||||
}
|
||||
/* Fall thru */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user