Skip to content

Commit 460799d

Browse files
Konfektchrisbra
authored andcommitted
runtime(netrw): small fixes to netrw#BrowseX
- do not enter dir in Netrw on opening - double quotes after start cause error on Windows See @chrisbra 's comments at [0] [0]: techntools/vim@ff82e7a#diff-39baf27d8f62071617bbef12f874cce31c0ebd02ec99e7b119474ca870c636a3R5279 Signed-off-by: Konfekt <Konfekt@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 437bc13 commit 460799d

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

runtime/autoload/netrw.vim

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
" 2024 Nov 07 by Vim Project: use keeppatterns to prevent polluting the search history
3636
" 2024 Nov 07 by Vim Project: fix a few issues with netrw tree listing (#15996)
3737
" 2024 Nov 10 by Vim Project: directory symlink not resolved in tree view (#16020)
38+
" 2024 Nov 14 by Vim Project: small fixes to netrw#BrowseX (#16056)
3839
" }}}
3940
" Former Maintainer: Charles E Campbell
4041
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
@@ -5004,7 +5005,7 @@ if has('unix')
50045005
let args = a:args
50055006
exe 'silent !' ..
50065007
\ ((args =~? '\v<\f+\.(exe|com|bat|cmd)>') ?
5007-
\ 'cmd.exe /c start "" /b ' .. args :
5008+
\ 'cmd.exe /c start /b ' .. args :
50085009
\ 'nohup ' .. args .. ' ' .. s:redir() .. ' &')
50095010
\ | redraw!
50105011
endfun
@@ -5083,10 +5084,7 @@ endif
50835084
" given filename; typically this means given their extension.
50845085
" 0=local, 1=remote
50855086
fun! netrw#BrowseX(fname,remote)
5086-
if a:remote == 0 && isdirectory(a:fname)
5087-
" if its really just a local directory, then do a "gf" instead
5088-
exe "e ".a:fname
5089-
elseif a:remote == 1 && a:fname !~ '^https\=:' && a:fname =~ '/$'
5087+
if a:remote == 1 && a:fname !~ '^https\=:' && a:fname =~ '/$'
50905088
" remote directory, not a webpage access, looks like an attempt to do a directory listing
50915089
norm! gf
50925090
endif

0 commit comments

Comments
 (0)