From: Daniel Carl Date: Sat, 16 Feb 2013 14:34:59 +0000 (+0100) Subject: Don't strip any whitespace to process input. X-Git-Url: https://git.owens.tech/projects.html/projects.html/git?a=commitdiff_plain;h=bf3d1b59f4b47614d375829310096e247b9483b6;p=vimb.git Don't strip any whitespace to process input. The whitespace might be relevant input like for the input commands where something like ':input :open ' is useful. --- diff --git a/src/main.c b/src/main.c index 8b91bce..c8ee0b3 100644 --- a/src/main.c +++ b/src/main.c @@ -283,7 +283,6 @@ static void vp_inspector_finished(WebKitWebInspector* inspector) static gboolean vp_process_input(const char* input) { gboolean success; - char* line = NULL; char* command = NULL; char** token; @@ -291,15 +290,11 @@ static gboolean vp_process_input(const char* input) return FALSE; } - line = g_strdup(input); - g_strstrip(line); - /* get a possible command count */ - vp.state.count = g_ascii_strtoll(line, &command, 10); + vp.state.count = g_ascii_strtoll(input, &command, 10); /* split the input string into command and parameter part */ token = g_strsplit(command, " ", 2); - g_free(line); if (!token[0]) { g_strfreev(token);