diff options
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c index 4bd773e0bd..55012bfcbd 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5245,9 +5245,10 @@ vim_tempname( // Backslashes in a temp file name cause problems when filtering with // "sh". NOTE: This also checks 'shellcmdflag' to help those people who - // didn't set 'shellslash'. + // didn't set 'shellslash' but only if not using PowerShell. retval = utf16_to_enc(itmp, NULL); - if (*p_shcf == '-' || p_ssl) + if ((strstr((char *)gettail(p_sh), "powershell") == NULL + && *p_shcf == '-') || p_ssl) for (p = retval; *p; ++p) if (*p == '\\') *p = '/'; |