runtime(netrw): only check first arg of netrw_browsex_viewer for being executable
Commit: https://github.com/vim/vim/commit/92b36663f8d0e507f60f357c6add6f6c9148a951 Author: Christian Brabandt <c...@256bit.org> Date: Sun Dec 8 09:52:37 2024 +0100 runtime(netrw): only check first arg of netrw_browsex_viewer for being executable fixes: https://github.com/vim/vim/issues/16185 Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 9650f6dff..b90a8d672 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -39,6 +39,7 @@ " 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 @@ -5076,7 +5077,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' -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1tKD97-00GtBg-82%40256bit.org.