diff options
| author | Bram Moolenaar <Bram@vim.org> | 2016-11-04 21:22:37 +0100 |
|---|---|---|
| committer | Bram Moolenaar <Bram@vim.org> | 2016-11-04 21:22:37 +0100 |
| commit | 426f3754223c8ff8a1bc51d6ba1eba11e8982ebc (patch) | |
| tree | 99e61b82b8af5bb25d3d7b5e4ddcd366b635e24b /src/normal.c | |
| parent | de5e2c219b99895445fb75ae3541ee69282a5846 (diff) | |
| download | vim-git-426f3754223c8ff8a1bc51d6ba1eba11e8982ebc.tar.gz | |
patch 8.0.0060v8.0.0060
Problem: When using an Ex command for 'keywordprg' it is escaped as with a
shell command. (Romain Lafourcade)
Solution: Escape for an Ex command. (closes #1175)
Diffstat (limited to 'src/normal.c')
| -rw-r--r-- | src/normal.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/normal.c b/src/normal.c index 99ced410d..f5e5475f3 100644 --- a/src/normal.c +++ b/src/normal.c @@ -5713,9 +5713,13 @@ nv_ident(cmdarg_T *cap) */ if (cmdchar == 'K' && !kp_help) { - /* Escape the argument properly for a shell command */ ptr = vim_strnsave(ptr, n); - p = vim_strsave_shellescape(ptr, TRUE, TRUE); + if (kp_ex) + /* Escape the argument properly for an Ex command */ + p = vim_strsave_fnameescape(ptr, FALSE); + else + /* Escape the argument properly for a shell command */ + p = vim_strsave_shellescape(ptr, TRUE, TRUE); vim_free(ptr); if (p == NULL) { |
