From: Jonas Fonseca Date: Mon, 2 Feb 2009 08:08:46 +0000 (+0100) Subject: Fix tokenizing when parsing ~/.tigrc X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a68b271e11a0c4dae6ac881bae758c81d9c183b6;p=tig.git Fix tokenizing when parsing ~/.tigrc When moving to use argv_from_string() in set_option() a regression was introduced causing problems with parsing of multiple spaces between arguments. For example: color date yellow default Reported by Clifford Caoile. --- diff --git a/NEWS b/NEWS index d8e1468..c8d080b 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,7 @@ Bug fixes: - Tree view: fix memory corruption bug when updating. - Fix regression for non-UTF-8 locales corrupting the view data. + - Fix regression parsing multiple spaces in ~/.tigrc. tig-0.13 -------- diff --git a/tig.c b/tig.c index 2a909b6..c569afc 100644 --- a/tig.c +++ b/tig.c @@ -292,7 +292,7 @@ argv_from_string(const char *argv[SIZEOF_ARG], int *argc, char *cmd) cmd[valuelen] = 0; argv[(*argc)++] = chomp_string(cmd); - cmd += valuelen + advance; + cmd = chomp_string(cmd + valuelen + advance); } if (*argc < SIZEOF_ARG)