File tree Expand file tree Collapse file tree
runtime/pack/dist/opt/netrw/autoload Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33" Maintainer: This runtime file is looking for a new maintainer.
44" Last Change:
55" 2025 Aug 07 by Vim Project (use correct "=~#" for netrw_stylesize option #17901)
6+ " 2025 Aug 07 by Vim Project (netrw#BrowseX() distinguishes remote files #17794)
67" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
78" Permission is hereby granted to use and distribute this code,
89" with or without modifications, provided that this copyright
@@ -4125,7 +4126,7 @@ function s:NetrwBrowseUpDir(islocal)
41254126endfunction
41264127
41274128" netrw#BrowseX: (implements "x") executes a special "viewer" script or program for the {{{2
4128- " given filename; typically this means given their extension.
4129+ " given filename; typically this means given their extension.
41294130function netrw#BrowseX (fname)
41304131 " special core dump handler
41314132 if a: fname = ~ ' /core\(\.\d\+\)\=$' && exists (" g:Netrw_corehandler" )
@@ -4149,7 +4150,12 @@ function netrw#BrowseX(fname)
41494150 let fname = substitute (fname, ' ^\~' , expand (" $HOME" ), ' ' )
41504151 endif
41514152
4152- call netrw#os#Open (s: NetrwFile (fname))
4153+ if fname = ~ ' ^[a-z]\+://'
4154+ " open a remote file
4155+ call netrw#os#Open (fname)
4156+ else
4157+ call netrw#os#Open (s: NetrwFile (fname))
4158+ endif
41534159endfunction
41544160
41554161" s:NetrwBufRename: renames a buffer without the side effect of retaining an unlisted buffer having the old name {{{2
You can’t perform that action at this time.
0 commit comments