aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-11-15 08:38:48 +0100
committerChristian Clason <ch.clason+github@icloud.com>2024-11-15 09:32:15 +0100
commitc9045f5ba3b721a451f307e22dff095c4e0e7bd8 (patch)
tree69f9e1645cba413feee23ab4b1d13ce74bb6518e
parentf0fd9acc4bcc4233a4bc661f23626abe496a3cee (diff)
downloadrneovim-c9045f5ba3b721a451f307e22dff095c4e0e7bd8.tar.gz
rneovim-c9045f5ba3b721a451f307e22dff095c4e0e7bd8.tar.bz2
rneovim-c9045f5ba3b721a451f307e22dff095c4e0e7bd8.zip
vim-patch:460799d: 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]: https://github.com/techntools/vim/commit/ff82e7a9dbef1cf98525be3186d65f450390e3b7#diff-39baf27d8f62071617bbef12f874cce31c0ebd02ec99e7b119474ca870c636a3R5279 https://github.com/vim/vim/commit/460799d885feeabd57b4e9336c513e53b2c7c86f Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
-rw-r--r--runtime/autoload/netrw.vim8
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index f32367ffd8..1df545278f 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -35,6 +35,7 @@
" 2024 Nov 07 by Vim Project: use keeppatterns to prevent polluting the search history
" 2024 Nov 07 by Vim Project: fix a few issues with netrw tree listing (#15996)
" 2024 Nov 10 by Vim Project: directory symlink not resolved in tree view (#16020)
+" 2024 Nov 14 by Vim Project: small fixes to netrw#BrowseX (#16056)
" }}}
" Former Maintainer: Charles E Campbell
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
@@ -4999,7 +5000,7 @@ if has('unix')
let args = a:args
exe 'silent !' ..
\ ((args =~? '\v<\f+\.(exe|com|bat|cmd)>') ?
- \ 'cmd.exe /c start "" /b ' .. args :
+ \ 'cmd.exe /c start /b ' .. args :
\ 'nohup ' .. args .. ' ' .. s:redir() .. ' &')
\ | redraw!
endfun
@@ -5078,10 +5079,7 @@ endif
" given filename; typically this means given their extension.
" 0=local, 1=remote
fun! netrw#BrowseX(fname,remote)
- if a:remote == 0 && isdirectory(a:fname)
- " if its really just a local directory, then do a "gf" instead
- exe "e ".a:fname
- elseif a:remote == 1 && a:fname !~ '^https\=:' && a:fname =~ '/$'
+ if a:remote == 1 && a:fname !~ '^https\=:' && a:fname =~ '/$'
" remote directory, not a webpage access, looks like an attempt to do a directory listing
norm! gf
endif