From 55350d8a29bae91e521ea4179c85e4669b639eaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 2 Jun 2017 22:55:53 +0200 Subject: fset: remove useless refresh when an option not displayed is changed --- src/plugins/fset/fset-option.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/fset/fset-option.c b/src/plugins/fset/fset-option.c index b1978af9b..133df19b9 100644 --- a/src/plugins/fset/fset-option.c +++ b/src/plugins/fset/fset-option.c @@ -1069,10 +1069,10 @@ fset_option_config_changed (const char *option_name) ptr_fset_option = (option_name) ? fset_option_search_by_name (option_name, &line) : NULL; + ptr_option = (option_name) ? weechat_config_get (option_name) : NULL; if (ptr_fset_option) { - ptr_option = weechat_config_get (ptr_fset_option->name); if (ptr_option) { fset_option_set_values (ptr_fset_option, ptr_option); @@ -1084,7 +1084,7 @@ fset_option_config_changed (const char *option_name) full_refresh = 1; } } - else + else if (!ptr_option) { /* option added: get options and refresh the whole buffer */ full_refresh = 1; -- cgit v1.2.3