Mercurial > vim
diff src/fileio.c @ 25068:0ce24f734615 v8.2.3071
patch 8.2.3071: shell options are not set properly for PowerShell
Commit: https://github.com/vim/vim/commit/127950241e84c822d3c50f46a00d42a70d2d5cb6
Author: Mike Williams <mikew@globalgraphics.com>
Date: Mon Jun 28 20:53:58 2021 +0200
patch 8.2.3071: shell options are not set properly for PowerShell
Problem: Shell options are not set properly for PowerShell.
Solution: Use better option defaults. (Mike Willams, closes https://github.com/vim/vim/issues/8459)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 28 Jun 2021 21:00:04 +0200 |
parents | 965d97f8208b |
children | beff72446e2e |
line wrap: on
line diff
--- 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 = '/';