From 252240a1b1ff587788b46bb28d7db0f89d1aa4aa 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 22d1dca55..15c051f20 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -27,6 +27,7 @@ New features:: 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: call hook config when options are removed * core: display an error with command `/history N` when N is not a valid integer 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--; } } }