diff options
author | Ryan Huber <rhuber@gmail.com> | 2014-04-04 12:22:04 -0700 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2014-04-04 12:22:04 -0700 |
commit | ec4a1807c2092d6eaf6fe9a23bbc34325bf57b05 (patch) | |
tree | 9ed3539c8f8e6961c8fd1864ae67286ccda2f614 /wee_slack.py | |
parent | 12951031b4b3f2c54d989aa3d8d7560d7c34ebf5 (diff) | |
download | wee-slack-ec4a1807c2092d6eaf6fe9a23bbc34325bf57b05.tar.gz |
switch to debug buffer if it exists, don't recreate
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/wee_slack.py b/wee_slack.py index 6a0792b..6a0a687 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -346,10 +346,13 @@ def closed_slack_debug_buffer_cb(data, buffer): def create_slack_debug_buffer(): global slack_debug, debug_string - debug_string = None - slack_debug = w.buffer_new("slack-debug", "", "closed_slack_debug_buffer_cb", "", "") - w.buffer_set(slack_debug, "notify", "0") - w.buffer_set(slack_debug, "display", "1") + if slack_debug != None: + w.buffer_set(slack_debug, "display", "1") + else: + debug_string = None + slack_debug = w.buffer_new("slack-debug", "", "closed_slack_debug_buffer_cb", "", "") + w.buffer_set(slack_debug, "notify", "0") + w.buffer_set(slack_debug, "display", "1") ### END Utility Methods |