From f51c79e6741321024dc34b7d7341bb00634d1e43 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Mon, 19 Nov 2012 19:24:30 +0100 Subject: [PATCH] Fixed regression in complation with numberd prefixes. Inputs like :50j could not be completed anymore by a previous commit. This patch fixes the issue. --- src/completion.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/completion.c b/src/completion.c index eb03efe..3f0d46d 100644 --- a/src/completion.c +++ b/src/completion.c @@ -105,13 +105,14 @@ static GList* completion_init_completion(GList* target, GList* source, const gch gboolean match; gchar **token = NULL; + /* skip prefix for completion */ + if (g_str_has_prefix(input, prefix)) { + input = input + strlen(prefix); + } + /* remove counts before command and save it to print it later in inputbox */ vp.comps.count = g_ascii_strtoll(input, &command, 10); - if (g_str_has_prefix(command, prefix)) { - command = command + strlen(prefix); - } - token = g_strsplit(command, " ", -1); for (GList* l = source; l; l = l->next) { -- 2.20.1