aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-12-09 09:35:11 +0800
committerGitHub <noreply@github.com>2024-12-09 09:35:11 +0800
commit30726c778cfca7825654848acf5516158a7beb3d (patch)
treec637e3ea535882b9bb5a19bc3c4093004cd0b21e
parent84d9f4f9f9efbfc72630f01f5f837c50fd7020d4 (diff)
parent3d318be8cd9b85f497411d08e9ff26af53117773 (diff)
downloadrneovim-30726c778cfca7825654848acf5516158a7beb3d.tar.gz
rneovim-30726c778cfca7825654848acf5516158a7beb3d.tar.bz2
rneovim-30726c778cfca7825654848acf5516158a7beb3d.zip
Merge pull request #31523 from zeertzjq/vim-eda923e
vim-patch: netrw fixes
-rw-r--r--runtime/autoload/netrw.vim8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index 6a26a7d0b1..cbe0b29620 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -38,6 +38,8 @@
" 2024 Nov 14 by Vim Project: small fixes to netrw#BrowseX (#16056)
" 2024 Nov 23 by Vim Project: update decompress defaults (#16104)
" 2024 Nov 23 by Vim Project: fix powershell escaping issues (#16094)
+" 2024 Dec 04 by Vim Project: do not detach for gvim (#16168)
+" 2024 Dec 08 by Vim Project: check the first arg of netrw_browsex_viewer for being executable (#16185)
" }}}
" Former Maintainer: Charles E Campbell
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
@@ -5040,7 +5042,7 @@ if has('unix')
endfun
else
fun! netrw#Launch(args)
- exe ':silent ! nohup' a:args s:redir() '&' | redraw!
+ exe ':silent ! nohup' a:args s:redir() (has('gui_running') ? '' : '&') | redraw!
endfun
endif
elseif has('win32')
@@ -5070,7 +5072,9 @@ elseif executable('open')
endif
fun! s:viewer()
- if exists('g:netrw_browsex_viewer') && executable(g:netrw_browsex_viewer)
+ " g:netrw_browsex_viewer could be a string of program + its arguments,
+ " test if first argument is executable
+ if exists('g:netrw_browsex_viewer') && executable(split(g:netrw_browsex_viewer)[0])
" extract any viewing options. Assumes that they're set apart by spaces.
" call Decho("extract any viewing options from g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">",'~'.expand("<slnum>"))
if g:netrw_browsex_viewer =~ '\s'