From adae98e94d58ebc29dd02d9404dfc7593716baa8 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 10 Mar 2011 17:38:18 +0100 Subject: [PATCH] Fix bug with repeat of last completion ("%*"), which failed when many templates are used in completion --- ChangeLog | 4 +++- src/gui/gui-completion.c | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6ee17875c..8198d22fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,14 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.3.5-dev, 2011-03-09 +v0.3.5-dev, 2011-03-10 Version 0.3.5 (under dev!) -------------------------- +* core: fix bug with repeat of last completion ("%*"), which failed when many + templates are used in completion * core: allow list of buffers in command /filter (exclusion with prefix "!") (task #10880) * core: reload file with certificate authorities when option diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index 17d57fc30..6b1f5b2a6 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -588,11 +588,10 @@ gui_completion_build_list (struct t_gui_completion *completion) } if (repeat_last) { - pos_space = rindex (HOOK_COMMAND(ptr_hook, completion), ' '); + pos_space = rindex (template, ' '); gui_completion_build_list_template (completion, (pos_space) ? - pos_space + 1 : HOOK_COMMAND(ptr_hook, - completion), + pos_space + 1 : template, ptr_hook->plugin); } free (template);