aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-11-22 11:06:46 +0800
committerGitHub <noreply@github.com>2023-11-22 11:06:46 +0800
commit059dc3f4a6b94cd028c5041d682982e6eed9bc87 (patch)
treefa1104b7e3bc0e82002481bce529d9f85e87f31f
parent820823c76d44c4d1fc350e68d9d75c65c80c72f7 (diff)
downloadrneovim-059dc3f4a6b94cd028c5041d682982e6eed9bc87.tar.gz
rneovim-059dc3f4a6b94cd028c5041d682982e6eed9bc87.tar.bz2
rneovim-059dc3f4a6b94cd028c5041d682982e6eed9bc87.zip
vim-patch:cb0c113ddc01 (#26147)
runtime(netrw): expand $COMSPEC without applying 'wildignore' (vim/vim#13542) When expanding $COMSPEC and a user has set :set wildignore=*.exe netrw won't be able to properly cmd.exe, because it does not ignore the wildignore setting. So let's explicitly use expand() without applying the 'wildignore' and 'suffixes' settings to the result closes: vim/vim#13426 https://github.com/vim/vim/commit/cb0c113ddc0101b05a27c040774cb7106fc74cd4 Co-authored-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--runtime/autoload/netrw.vim12
1 files changed, 7 insertions, 5 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index e3e28b6de2..9dc9d28b1a 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -1,7 +1,9 @@
" netrw.vim: Handles file transfer and remote directory listing across
" AUTOLOAD SECTION
" Date: May 03, 2023
-" Version: 173
+" Version: 173a
+" Last Change:
+" 2023 Nov 21 by Vim Project: ignore wildignore when expanding $COMSPEC (v173a)
" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
@@ -398,7 +400,7 @@ if !exists("g:netrw_localcopycmd")
if g:netrw_cygwin
let g:netrw_localcopycmd= "cp"
else
- let g:netrw_localcopycmd = expand("$COMSPEC")
+ let g:netrw_localcopycmd = expand("$COMSPEC", v:true)
let g:netrw_localcopycmdopt= " /c copy"
endif
elseif has("unix") || has("macunix")
@@ -413,7 +415,7 @@ if !exists("g:netrw_localcopydircmd")
let g:netrw_localcopydircmd = "cp"
let g:netrw_localcopydircmdopt= " -R"
else
- let g:netrw_localcopydircmd = expand("$COMSPEC")
+ let g:netrw_localcopydircmd = expand("$COMSPEC", v:true)
let g:netrw_localcopydircmdopt= " /c xcopy /e /c /h /i /k"
endif
elseif has("unix")
@@ -434,7 +436,7 @@ if has("win32") || has("win95") || has("win64") || has("win16")
if g:netrw_cygwin
call s:NetrwInit("g:netrw_localmkdir","mkdir")
else
- let g:netrw_localmkdir = expand("$COMSPEC")
+ let g:netrw_localmkdir = expand("$COMSPEC", v:true)
let g:netrw_localmkdiropt= " /c mkdir"
endif
else
@@ -450,7 +452,7 @@ if !exists("g:netrw_localmovecmd")
if g:netrw_cygwin
let g:netrw_localmovecmd= "mv"
else
- let g:netrw_localmovecmd = expand("$COMSPEC")
+ let g:netrw_localmovecmd = expand("$COMSPEC", v:true)
let g:netrw_localmovecmdopt= " /c move"
endif
elseif has("unix") || has("macunix")