summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 730ae86)
raw | patch | inline | side by side (parent: 730ae86)
author | Jonas Fonseca <fonseca@diku.dk> | |
Fri, 18 Mar 2011 12:32:21 +0000 (08:32 -0400) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Fri, 18 Mar 2011 12:32:21 +0000 (08:32 -0400) |
tig.c | patch | blob | history |
index c1e527083372f3cddca17f6263ee3072a702baf9..7ad7fe741ce2b80ac74c58503b9529ed76ecb886 100644 (file)
--- a/tig.c
+++ b/tig.c
}
static bool
-format_argv(const char ***dst_argv, const char *src_argv[], bool replace, bool first)
+format_argv(const char ***dst_argv, const char *src_argv[], bool first)
{
char buf[SIZEOF_STR];
int argc;
@@ -2428,7 +2428,7 @@ format_argv(const char ***dst_argv, const char *src_argv[], bool replace, bool f
int len = next - arg;
const char *value;
- if (!next || !replace) {
+ if (!next) {
len = strlen(arg);
value = "";
@@ -2443,7 +2443,7 @@ format_argv(const char ***dst_argv, const char *src_argv[], bool replace, bool f
if (!string_format_from(buf, &bufpos, "%.*s%s", len, arg, value))
return FALSE;
- arg = next && replace ? strchr(next, ')') + 1 : NULL;
+ arg = next ? strchr(next, ')') + 1 : NULL;
}
if (!argv_append(dst_argv, buf))
@@ -2529,7 +2529,7 @@ begin_update(struct view *view, const char *dir, const char **argv, enum open_fl
if (!refresh) {
view->dir = dir;
- if (!format_argv(&view->argv, argv, TRUE, !view->prev))
+ if (!format_argv(&view->argv, argv, !view->prev))
return FALSE;
/* Put the current ref_* value to the view title ref
return;
}
- if (format_argv(&argv, req->argv, TRUE, FALSE))
+ if (format_argv(&argv, req->argv, FALSE))
open_external_viewer(argv, NULL);
if (argv)
argv_free(argv);