diff options
author | Tom Feist <shabble@metavore.org> | 2010-12-04 05:25:40 +0000 |
---|---|---|
committer | Tom Feist <shabble@metavore.org> | 2010-12-04 05:25:40 +0000 |
commit | 871ae4a7a178b60c7d779a9d9987c76422fbfc18 (patch) | |
tree | 459eab93f3d4d768fdb289fab907cfacf1fc90b6 | |
parent | ido_switcher: some progress, ported most of the modal functionality from (diff) | |
download | irssi-scripts-871ae4a7a178b60c7d779a9d9987c76422fbfc18.tar.gz irssi-scripts-871ae4a7a178b60c7d779a9d9987c76422fbfc18.zip |
uberprompt: have the debug_prompt_changed handler added/removed appropriately
when toggling the _debug flag.
-rw-r--r-- | prompt_info/uberprompt.pl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/prompt_info/uberprompt.pl b/prompt_info/uberprompt.pl index 41803d8..8a9f50b 100644 --- a/prompt_info/uberprompt.pl +++ b/prompt_info/uberprompt.pl @@ -235,10 +235,6 @@ sub init { Irssi::signal_register({'prompt length request' => []}); Irssi::signal_add('prompt length request', \&length_request_handler); - - if (DEBUG) { - Irssi::signal_add 'prompt changed', \&debug_prompt_changed; - } } sub refresh_if_me { @@ -277,6 +273,13 @@ sub reload_settings { $DEBUG_ENABLED = Irssi::settings_get_bool('uberprompt_debug'); + if (DEBUG) { + Irssi::signal_add 'prompt changed', 'debug_prompt_changed'; + } else { + Irssi::signal_remove 'prompt changed', 'debug_prompt_changed'; + } + + my $new = Irssi::settings_get_str('uberprompt_format'); if ($prompt_format ne $new) { |