Mercurial > vim
diff src/fileio.c @ 25084:beff72446e2e v8.2.3079
patch 8.2.3079: Powershell core not supported by default
Commit: https://github.com/vim/vim/commit/a3d1b29bd36487167c98b3cefa30f06c529e412d
Author: Mike Williams <mikew@globalgraphics.com>
Date: Wed Jun 30 20:56:00 2021 +0200
patch 8.2.3079: Powershell core not supported by default
Problem: Powershell core not supported by default.
Solution: Set option defaults for "pwsh". (Mike Williams, closes https://github.com/vim/vim/issues/8481)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 30 Jun 2021 21:00:05 +0200 |
parents | 0ce24f734615 |
children | 1919361a53da |
line wrap: on
line diff
--- a/src/fileio.c +++ b/src/fileio.c @@ -5222,6 +5222,7 @@ vim_tempname( WCHAR *chartab = L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char_u *retval; char_u *p; + char_u *shname; long i; wcscpy(itmp, L""); @@ -5247,8 +5248,10 @@ vim_tempname( // "sh". NOTE: This also checks 'shellcmdflag' to help those people who // didn't set 'shellslash' but only if not using PowerShell. retval = utf16_to_enc(itmp, NULL); - if ((strstr((char *)gettail(p_sh), "powershell") == NULL - && *p_shcf == '-') || p_ssl) + shname = gettail(p_sh); + if ((*p_shcf == '-' && !(strstr((char *)shname, "powershell") != NULL + || strstr((char *)shname, "pwsh") != NULL )) + || p_ssl) for (p = retval; *p; ++p) if (*p == '\\') *p = '/';