From 9c9bb778550cf1f6288a14abbd52c8a487f6d3d6 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Tue, 9 Apr 2013 00:10:12 +0200 Subject: [PATCH] Fixed no more working command completion with counts. Commands with count could not be completed, because the count extraction was removed in previous commits so that :5scro could not be completed. --- src/completion.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/completion.c b/src/completion.c index ddd1111..c07600f 100644 --- a/src/completion.c +++ b/src/completion.c @@ -113,10 +113,14 @@ gboolean completion_complete(gboolean back) history_list_free(&source); } else { + char *command = NULL; + /* remove counts before command and save it to print it later in inputbox */ + comps.count = g_ascii_strtoll(&input[1], &command, 10); + source = g_list_sort(command_get_all(), (GCompareFunc)g_strcmp0); comps.completions = init_completion( comps.completions, - filter_list(tmp, source, (Comp_Func)g_str_has_prefix, &input[1]), + filter_list(tmp, source, (Comp_Func)g_str_has_prefix, command), ":" ); g_list_free(source); -- 2.20.1