summaryrefslogtreecommitdiffstats
path: root/src/if_cscope.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-10-13 16:34:30 +0100
committerBram Moolenaar <Bram@vim.org>2022-10-13 16:34:30 +0100
commit66b8d2a89efb6bd482e3160c7494e646e31aea27 (patch)
tree8d4899ba1224794095645f93a8234d5e47bc5e22 /src/if_cscope.c
parent3558afe9e9e904cabb8475392d859f2d2fc21041 (diff)
patch 9.0.0743: starting cscope on Unix does not quote the arguments rightv9.0.0743
Problem: Starting cscope on Unix does not quote the arguments correctly. (Gary Johnson) Solution: Move the final quote after the arguments.
Diffstat (limited to 'src/if_cscope.c')
-rw-r--r--src/if_cscope.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/if_cscope.c b/src/if_cscope.c
index 809475039c..3252ff4916 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -954,7 +954,7 @@ err_closing:
// run the cscope command
#ifdef UNIX
- vim_snprintf(cmd, cmdlen, "/bin/sh -c \"exec %s -dl -f %s\"",
+ vim_snprintf(cmd, cmdlen, "/bin/sh -c \"exec %s -dl -f %s",
prog, csinfo[i].fname);
#else
vim_snprintf(cmd, cmdlen, "%s -dl -f %s", prog, csinfo[i].fname);
@@ -970,6 +970,9 @@ err_closing:
vim_snprintf(cmd + len, cmdlen - len, " %s", csinfo[i].flags);
}
# ifdef UNIX
+ // terminate the -c command argument
+ STRCAT(cmd, "\"");
+
// on Win32 we still need prog
vim_free(prog);
# endif