From df7a42845409dae6546c9c1e15d807bb4290907e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 4 Nov 2023 17:01:45 +0100 Subject: [PATCH] core: fix value of buffer variable "num_history" when the value defined in option weechat.history.max_commands is reached --- ChangeLog.adoc | 1 + src/gui/gui-history.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 1e0e68dea..0b5c1f27b 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -15,6 +15,7 @@ For a list of important changes that require manual actions, please look at rele Bug fixes:: + * core: fix value of buffer variable "num_history" when the value defined in option weechat.history.max_commands is reached * core: remove incorrect warning when binding keys kbd:[F10] to kbd:[F20] (issue #2039) * core: fix memory leak when config version is invalid or not supported * core: fix crash when "config_version" is present in a configuration file without a value diff --git a/src/gui/gui-history.c b/src/gui/gui-history.c index aa0117bd5..ba4c1022f 100644 --- a/src/gui/gui-history.c +++ b/src/gui/gui-history.c @@ -88,7 +88,7 @@ gui_history_buffer_add (struct t_gui_buffer *buffer, const char *string) free (buffer->last_history->text); free (buffer->last_history); buffer->last_history = ptr_history; - buffer->num_history++; + buffer->num_history--; } } }