+sub iset_refresh_option
+{
+ my $option_name = $_[0];
+ my $index = $_[1];
+ my $infolist = weechat::infolist_get("option", "", $option_name);
+ if ($infolist)
+ {
+ weechat::infolist_next($infolist);
+ if (weechat::infolist_fields($infolist))
+ {
+ $options_parent_names[$index] = weechat::infolist_string($infolist, "parent_name");
+ $options_types[$index] = weechat::infolist_string($infolist, "type");
+ $options_values[$index] = weechat::infolist_string($infolist, "value");
+ $options_default_values[$index] = weechat::infolist_string($infolist, "default_value");
+ $options_is_null[$index] = weechat::infolist_integer($infolist, "value_is_null");
+ $options_parent_values[$index] = undef;
+ if ($options_parent_names[$index]
+ && (($wee_version_number < 0x00040300) || (weechat::infolist_search_var($infolist, "parent_value"))))
+ {
+ $options_parent_values[$index] = weechat::infolist_string($infolist, "parent_value");
+ }
+ iset_refresh_line($index);
+ iset_title() if ($option_name eq "iset.look.show_current_line");
+ }
+ else
+ {
+ iset_full_refresh(1); # if not found, refresh fully without clearing buffer
+ weechat::print_y($iset_buffer, $#options_names + 1, "");
+ }
+ weechat::infolist_free($infolist);
+ }
+}
+