diff options
author | Mike Williams <mikew@globalgraphics.com> | 2021-06-30 20:56:00 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-06-30 20:56:00 +0200 |
commit | a3d1b29bd36487167c98b3cefa30f06c529e412d (patch) | |
tree | c2f313a89feb1b97cdd945ce904d258b518e9cae /src/fileio.c | |
parent | 834193afd7195bc96026d2aed696d64f8075cd35 (diff) | |
download | vim-git-a3d1b29bd36487167c98b3cefa30f06c529e412d.tar.gz |
patch 8.2.3079: Powershell core not supported by defaultv8.2.3079
Problem: Powershell core not supported by default.
Solution: Set option defaults for "pwsh". (Mike Williams, closes #8481)
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c index 55012bfcb..bd4038c36 100644 --- 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 = '/'; |