Browse Source

typing: remove hashtables when typing is turned off

master
Sébastien Helleu 11 months ago
parent
commit
1746e832ec
  1. 2
      src/plugins/typing/typing-config.c
  2. 10
      src/plugins/typing/typing.c

2
src/plugins/typing/typing-config.c

@ -64,7 +64,7 @@ typing_config_reload (const void *pointer, void *data, @@ -64,7 +64,7 @@ typing_config_reload (const void *pointer, void *data,
}
/*
* Callback for changes on option "typing.look.enabled".
* Callback for changes on options "typing.look.enabled_*".
*/
void

10
src/plugins/typing/typing.c

@ -518,6 +518,11 @@ typing_setup_hooks () @@ -518,6 +518,11 @@ typing_setup_hooks ()
typing_modifier_input_text_for_buffer = NULL;
weechat_unhook (typing_timer);
typing_timer = NULL;
if (typing_status_self)
{
weechat_hashtable_free (typing_status_self);
typing_status_self = NULL;
}
}
}
@ -551,6 +556,11 @@ typing_setup_hooks () @@ -551,6 +556,11 @@ typing_setup_hooks ()
typing_signal_typing_set_nick = NULL;
weechat_unhook (typing_signal_typing_reset_buffer);
typing_signal_typing_reset_buffer = NULL;
if (typing_status_nicks)
{
weechat_hashtable_free (typing_status_nicks);
typing_status_nicks = NULL;
}
}
}
}

Loading…
Cancel
Save