From 59cdade5f04bcca89ebe34497e3026677a4bd769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 17 Jun 2023 20:39:02 +0200 Subject: [PATCH] core: fix cursor position after `/plugin list -i` or `/plugin list -il` --- ChangeLog.adoc | 1 + src/core/wee-command.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index ebe9533ef..decb9d14d 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -26,6 +26,7 @@ Bug fixes:: * core: don't send "key_combo_*" signals for incomplete keys (issue #1976) * core: add key ctrl-backspace in /help key (issue #1975) * core: keep keys ctrl-H and ctrl-? (in lower case) if they were manually bound to custom commands in a previous version + * core: fix cursor position after `/plugin list -i` or `/plugin list -il` * irc: fix display of country code in message 344 received as whois geo info (issue #1736) Tests:: diff --git a/src/core/wee-command.c b/src/core/wee-command.c index bd7b7767a..873f0fbd3 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -4941,7 +4941,7 @@ command_plugin_list_input (struct t_gui_buffer *buffer, else { gui_buffer_set (buffer, "input", *buf); - length = strlen (*buf); + length = utf8_strlen (*buf); snprintf (str_pos, sizeof (str_pos), "%d", length); gui_buffer_set (buffer, "input_pos", str_pos); }