c->function(&a);
g_free(a.s);
+ /* if command was run, remove the modkey and count */
+ vp.state.modkey = vp.state.count = 0;
+ vp_update_statusbar();
+
return TRUE;
}
keys = g_slist_prepend(keys, keybind);
- /* save the modkey also in the modkey string */
+ /* save the modkey also in the modkey string */
if (modkey) {
g_string_append_c(modkeys, modkey);
}
Keybind* keybind = (Keybind*)link->data;
command_run(keybind->command, NULL);
- /* if key binding used, remove the modkey */
- vp.state.modkey = vp.state.count = 0;
- vp_update_statusbar();
-
return TRUE;
}
{
gboolean success;
gchar* line = g_strdup(input);
+ gchar* command = NULL;
gchar** token;
if (!input || !strlen(input)) {
g_strstrip(line);
+ /* get a possible command count */
+ vp.state.count = g_ascii_strtoll(line, &command, 10);
+
/* split the input string into command and parameter part */
- token = g_strsplit(line, " ", 2);
+ token = g_strsplit(command, " ", 2);
g_free(line);
if (!token[0]) {
typedef struct {
Mode mode;
gchar modkey;
- int count;
+ guint count;
} State;
/* behaviour */