Fixed regression in completion for counted commands.
authorDaniel Carl <danielcarl@gmx.de>
Sun, 2 Jun 2013 16:18:41 +0000 (18:18 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Sun, 2 Jun 2013 16:18:41 +0000 (18:18 +0200)
The commit d95b20c introduced a regression which made it impossible to
complete commands that have a count set for example `:3b<tab>`.

src/completion.c

index 8cd037d..c6ef46d 100644 (file)
@@ -109,7 +109,7 @@ gboolean completion_complete(gboolean back)
         /* remove counts before command and save it to print it later in inputbox */
         comps.count = g_ascii_strtoll(suffix, &command, 10);
 
-        source = g_list_sort(command_get_by_prefix(suffix), (GCompareFunc)g_strcmp0);
+        source = g_list_sort(command_get_by_prefix(command), (GCompareFunc)g_strcmp0);
         comps.completions = init_completion(comps.completions, source, prefix);
         g_list_free(source);
     } else if (type == VB_INPUT_SEARCH_FORWARD || type == VB_INPUT_SEARCH_BACKWARD) {