summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-01-12 17:09:47 +0100
committerSébastien Helleu <flashcode@flashtux.org>2020-01-12 17:09:47 +0100
commit7cd566e8d37fc06f8aef68e0e6a81d60df1dbc76 (patch)
tree63368957d090e0362c0cf1c2673b0eb592491870
parentb79cd6d54656b918a0fa84c3f307c59dbb89567d (diff)
downloadweechat-7cd566e8d37fc06f8aef68e0e6a81d60df1dbc76.zip
core: reset variable "old_full_name" after send of signal "buffer_renamed" (issue #1428)
-rw-r--r--ChangeLog.adoc2
-rw-r--r--src/gui/gui-buffer.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index 3d46447aa..990d39383 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -20,7 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
New features::
- * core: add variable "old_full_name" in buffer, set before the buffer is renamed (issue #1428)
+ * core: add variable "old_full_name" in buffer, set during buffer renaming (issue #1428)
* core: add debug option "-d" in command /eval (issue #1434)
* api: add info "weechat_headless" (issue #1433)
* buflist: add pointer "window" in bar item evaluation
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index 227be95a8..a3998c5e5 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -1319,6 +1319,12 @@ gui_buffer_set_name (struct t_gui_buffer *buffer, const char *name)
(void) hook_signal_send ("buffer_renamed",
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+
+ if (buffer->old_full_name)
+ {
+ free (buffer->old_full_name);
+ buffer->old_full_name = NULL;
+ }
}
/*