aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2020-06-17 23:41:25 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2020-06-20 23:01:50 +0200
commit582085cd8a53223237a9c232085abcbc42d291cc (patch)
treea74b2f26de826a5f3b86254e1a336f8650d44512 /wee_slack.py
parent55d96a7105e8a323b901ba087a036d70dc3840f5 (diff)
downloadwee-slack-582085cd8a53223237a9c232085abcbc42d291cc.tar.gz
Don't set label when changing buffer name
This caused a bug where the short_name got a double prefix, because the label was set to the short_name which wasn't changed.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index b1f7a87..9b2ad57 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -834,7 +834,8 @@ def reconnect_callback(*args):
def buffer_renamed_cb(data, signal, current_buffer):
channel = EVENTROUTER.weechat_controller.buffers.get(current_buffer)
if channel and not channel.buffer_rename_in_progress:
- channel.label = w.buffer_get_string(channel.channel_buffer, "short_name")
+ if not w.buffer_get_string(channel.channel_buffer, "old_full_name"):
+ channel.label = w.buffer_get_string(channel.channel_buffer, "short_name")
channel.rename()
return w.WEECHAT_RC_OK