Mercurial > vim
changeset 30817:e95794dadf52 v9.0.0743
patch 9.0.0743: starting cscope on Unix does not quote the arguments right
Commit: https://github.com/vim/vim/commit/66b8d2a89efb6bd482e3160c7494e646e31aea27
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Oct 13 16:34:30 2022 +0100
patch 9.0.0743: starting cscope on Unix does not quote the arguments right
Problem: Starting cscope on Unix does not quote the arguments correctly.
(Gary Johnson)
Solution: Move the final quote after the arguments.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 13 Oct 2022 17:45:03 +0200 |
parents | 33f1af1a6fb4 |
children | a4597b441141 |
files | src/if_cscope.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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