runtime(netrw): upstream snapshot v184
This change includes the following upstream commits: - fix: remove black lines in directory listing - fix: correctly create new file when using Lexplore - refactor: remove print functionality The main highlight is removing print functionality that was broken both in neovim and vim. closes: #17847 Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
827483054d
commit
0bda7830ac
@ -90,7 +90,6 @@ Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright*
|
|||||||
Marked Files: Grep..................................|netrw-mg|
|
Marked Files: Grep..................................|netrw-mg|
|
||||||
Marked Files: Hiding and Unhiding by Suffix.........|netrw-mh|
|
Marked Files: Hiding and Unhiding by Suffix.........|netrw-mh|
|
||||||
Marked Files: Moving................................|netrw-mm|
|
Marked Files: Moving................................|netrw-mm|
|
||||||
Marked Files: Printing..............................|netrw-mp|
|
|
||||||
Marked Files: Sourcing..............................|netrw-ms|
|
Marked Files: Sourcing..............................|netrw-ms|
|
||||||
Marked Files: Setting the Target Directory..........|netrw-mt|
|
Marked Files: Setting the Target Directory..........|netrw-mt|
|
||||||
Marked Files: Tagging...............................|netrw-mT|
|
Marked Files: Tagging...............................|netrw-mT|
|
||||||
@ -1066,7 +1065,6 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
|
|||||||
mg Apply vimgrep to marked files |netrw-mg|
|
mg Apply vimgrep to marked files |netrw-mg|
|
||||||
mh Toggle marked file suffices' presence on hiding list |netrw-mh|
|
mh Toggle marked file suffices' presence on hiding list |netrw-mh|
|
||||||
mm Move marked files to marked-file target directory |netrw-mm|
|
mm Move marked files to marked-file target directory |netrw-mm|
|
||||||
mp Print marked files |netrw-mp|
|
|
||||||
mr Mark files using a shell-style |regexp| |netrw-mr|
|
mr Mark files using a shell-style |regexp| |netrw-mr|
|
||||||
mt Current browsing directory becomes markfile target |netrw-mt|
|
mt Current browsing directory becomes markfile target |netrw-mt|
|
||||||
mT Apply ctags to marked files |netrw-mT|
|
mT Apply ctags to marked files |netrw-mT|
|
||||||
@ -2001,7 +1999,6 @@ The following netrw maps make use of marked files:
|
|||||||
|netrw-mF| Unmark marked files
|
|netrw-mF| Unmark marked files
|
||||||
|netrw-mg| Apply vimgrep to marked files
|
|netrw-mg| Apply vimgrep to marked files
|
||||||
|netrw-mm| Move marked files to target
|
|netrw-mm| Move marked files to target
|
||||||
|netrw-mp| Print marked files
|
|
||||||
|netrw-ms| Netrw will source marked files
|
|netrw-ms| Netrw will source marked files
|
||||||
|netrw-mt| Set target for |netrw-mm| and |netrw-mc|
|
|netrw-mt| Set target for |netrw-mm| and |netrw-mc|
|
||||||
|netrw-mT| Generate tags using marked files
|
|netrw-mT| Generate tags using marked files
|
||||||
@ -2266,15 +2263,6 @@ from the current window (where one does the mf) to the target.
|
|||||||
|
|
||||||
Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
|
Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
|
||||||
|
|
||||||
MARKED FILES: PRINTING *netrw-mp* {{{2
|
|
||||||
(See |netrw-mf| and |netrw-mr| for how to mark files)
|
|
||||||
(uses the local marked file list)
|
|
||||||
|
|
||||||
When "mp" is used, netrw will apply the |:hardcopy| command to marked files.
|
|
||||||
What netrw does is open each file in a one-line window, execute hardcopy, then
|
|
||||||
close the one-line window.
|
|
||||||
|
|
||||||
|
|
||||||
MARKED FILES: SOURCING *netrw-ms* {{{2
|
MARKED FILES: SOURCING *netrw-ms* {{{2
|
||||||
(See |netrw-mf| and |netrw-mr| for how to mark files)
|
(See |netrw-mf| and |netrw-mr| for how to mark files)
|
||||||
(uses the local marked file list)
|
(uses the local marked file list)
|
||||||
|
|||||||
@ -9204,7 +9204,6 @@ netrw-mm pi_netrw.txt /*netrw-mm*
|
|||||||
netrw-modify pi_netrw.txt /*netrw-modify*
|
netrw-modify pi_netrw.txt /*netrw-modify*
|
||||||
netrw-mouse pi_netrw.txt /*netrw-mouse*
|
netrw-mouse pi_netrw.txt /*netrw-mouse*
|
||||||
netrw-move pi_netrw.txt /*netrw-move*
|
netrw-move pi_netrw.txt /*netrw-move*
|
||||||
netrw-mp pi_netrw.txt /*netrw-mp*
|
|
||||||
netrw-mr pi_netrw.txt /*netrw-mr*
|
netrw-mr pi_netrw.txt /*netrw-mr*
|
||||||
netrw-ms pi_netrw.txt /*netrw-ms*
|
netrw-ms pi_netrw.txt /*netrw-ms*
|
||||||
netrw-mt pi_netrw.txt /*netrw-mt*
|
netrw-mt pi_netrw.txt /*netrw-mt*
|
||||||
|
|||||||
73
runtime/pack/dist/opt/netrw/autoload/netrw.vim
vendored
73
runtime/pack/dist/opt/netrw/autoload/netrw.vim
vendored
@ -19,7 +19,7 @@ if &cp || exists("g:loaded_netrw")
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:loaded_netrw = "v183"
|
let g:loaded_netrw = "v184"
|
||||||
|
|
||||||
if !has("patch-9.1.1054") && !has('nvim')
|
if !has("patch-9.1.1054") && !has('nvim')
|
||||||
echoerr 'netrw needs Vim v9.1.1054'
|
echoerr 'netrw needs Vim v9.1.1054'
|
||||||
@ -4861,7 +4861,6 @@ function s:NetrwMaps(islocal)
|
|||||||
nnoremap <buffer> <silent> <nowait> mg :<c-u>call <SID>NetrwMarkFileGrep(1)<cr>
|
nnoremap <buffer> <silent> <nowait> mg :<c-u>call <SID>NetrwMarkFileGrep(1)<cr>
|
||||||
nnoremap <buffer> <silent> <nowait> mh :<c-u>call <SID>NetrwMarkHideSfx(1)<cr>
|
nnoremap <buffer> <silent> <nowait> mh :<c-u>call <SID>NetrwMarkHideSfx(1)<cr>
|
||||||
nnoremap <buffer> <silent> <nowait> mm :<c-u>call <SID>NetrwMarkFileMove(1)<cr>
|
nnoremap <buffer> <silent> <nowait> mm :<c-u>call <SID>NetrwMarkFileMove(1)<cr>
|
||||||
nnoremap <buffer> <silent> <nowait> mp :<c-u>call <SID>NetrwMarkFilePrint(1)<cr>
|
|
||||||
nnoremap <buffer> <silent> <nowait> mr :<c-u>call <SID>NetrwMarkFileRegexp(1)<cr>
|
nnoremap <buffer> <silent> <nowait> mr :<c-u>call <SID>NetrwMarkFileRegexp(1)<cr>
|
||||||
nnoremap <buffer> <silent> <nowait> ms :<c-u>call <SID>NetrwMarkFileSource(1)<cr>
|
nnoremap <buffer> <silent> <nowait> ms :<c-u>call <SID>NetrwMarkFileSource(1)<cr>
|
||||||
nnoremap <buffer> <silent> <nowait> mT :<c-u>call <SID>NetrwMarkFileTag(1)<cr>
|
nnoremap <buffer> <silent> <nowait> mT :<c-u>call <SID>NetrwMarkFileTag(1)<cr>
|
||||||
@ -4973,7 +4972,6 @@ function s:NetrwMaps(islocal)
|
|||||||
nnoremap <buffer> <silent> <nowait> mg :<c-u>call <SID>NetrwMarkFileGrep(0)<cr>
|
nnoremap <buffer> <silent> <nowait> mg :<c-u>call <SID>NetrwMarkFileGrep(0)<cr>
|
||||||
nnoremap <buffer> <silent> <nowait> mh :<c-u>call <SID>NetrwMarkHideSfx(0)<cr>
|
nnoremap <buffer> <silent> <nowait> mh :<c-u>call <SID>NetrwMarkHideSfx(0)<cr>
|
||||||
nnoremap <buffer> <silent> <nowait> mm :<c-u>call <SID>NetrwMarkFileMove(0)<cr>
|
nnoremap <buffer> <silent> <nowait> mm :<c-u>call <SID>NetrwMarkFileMove(0)<cr>
|
||||||
nnoremap <buffer> <silent> <nowait> mp :<c-u>call <SID>NetrwMarkFilePrint(0)<cr>
|
|
||||||
nnoremap <buffer> <silent> <nowait> mr :<c-u>call <SID>NetrwMarkFileRegexp(0)<cr>
|
nnoremap <buffer> <silent> <nowait> mr :<c-u>call <SID>NetrwMarkFileRegexp(0)<cr>
|
||||||
nnoremap <buffer> <silent> <nowait> ms :<c-u>call <SID>NetrwMarkFileSource(0)<cr>
|
nnoremap <buffer> <silent> <nowait> ms :<c-u>call <SID>NetrwMarkFileSource(0)<cr>
|
||||||
nnoremap <buffer> <silent> <nowait> mT :<c-u>call <SID>NetrwMarkFileTag(0)<cr>
|
nnoremap <buffer> <silent> <nowait> mT :<c-u>call <SID>NetrwMarkFileTag(0)<cr>
|
||||||
@ -5932,39 +5930,6 @@ function s:NetrwMarkFileMove(islocal)
|
|||||||
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" s:NetrwMarkFilePrint: (invoked by mp) This function prints marked files {{{2
|
|
||||||
" using the hardcopy command. Local marked-file list only.
|
|
||||||
function s:NetrwMarkFilePrint(islocal)
|
|
||||||
let curbufnr= bufnr("%")
|
|
||||||
|
|
||||||
" sanity check
|
|
||||||
if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr})
|
|
||||||
call netrw#msg#Notify('ERROR', 'there are no marked files in this window (:help netrw-mf)')
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
let curdir= s:NetrwGetCurdir(a:islocal)
|
|
||||||
|
|
||||||
if exists("s:netrwmarkfilelist_{curbufnr}")
|
|
||||||
let netrwmarkfilelist = s:netrwmarkfilelist_{curbufnr}
|
|
||||||
call s:NetrwUnmarkList(curbufnr,curdir)
|
|
||||||
for fname in netrwmarkfilelist
|
|
||||||
if a:islocal
|
|
||||||
if g:netrw_keepdir
|
|
||||||
let fname= netrw#fs#ComposePath(curdir,fname)
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
let fname= curdir.fname
|
|
||||||
endif
|
|
||||||
1split
|
|
||||||
" the autocmds will handle both local and remote files
|
|
||||||
exe "sil NetrwKeepj e ".fnameescape(fname)
|
|
||||||
hardcopy
|
|
||||||
q
|
|
||||||
endfor
|
|
||||||
2match none
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" s:NetrwMarkFileRegexp: (invoked by mr) This function is used to mark {{{2
|
" s:NetrwMarkFileRegexp: (invoked by mr) This function is used to mark {{{2
|
||||||
" files when given a regexp (for which a prompt is
|
" files when given a regexp (for which a prompt is
|
||||||
" issued) (matches to name of files).
|
" issued) (matches to name of files).
|
||||||
@ -6195,37 +6160,20 @@ endfunction
|
|||||||
|
|
||||||
" s:NetrwOpenFile: query user for a filename and open it {{{2
|
" s:NetrwOpenFile: query user for a filename and open it {{{2
|
||||||
function s:NetrwOpenFile(islocal)
|
function s:NetrwOpenFile(islocal)
|
||||||
let ykeep= @@
|
|
||||||
call inputsave()
|
call inputsave()
|
||||||
let fname= input("Enter filename: ")
|
let fname = input("Enter filename: ")
|
||||||
call inputrestore()
|
call inputrestore()
|
||||||
|
|
||||||
" determine if Lexplore is in use
|
if empty(fname)
|
||||||
if exists("t:netrw_lexbufnr")
|
return
|
||||||
" check if t:netrw_lexbufnr refers to a netrw window
|
|
||||||
let lexwinnr = bufwinnr(t:netrw_lexbufnr)
|
|
||||||
if lexwinnr != -1 && exists("g:netrw_chgwin") && g:netrw_chgwin != -1
|
|
||||||
exe "NetrwKeepj keepalt ".g:netrw_chgwin."wincmd w"
|
|
||||||
exe "NetrwKeepj e ".fnameescape(fname)
|
|
||||||
let @@= ykeep
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Does the filename contain a path?
|
" save position for benefit of Rexplore
|
||||||
if fname !~ '[/\\]'
|
let s:rexposn_{bufnr("%")}= winsaveview()
|
||||||
if exists("b:netrw_curdir")
|
|
||||||
" save position for benefit of Rexplore
|
execute "NetrwKeepj e " . fnameescape(!isabsolutepath(fname)
|
||||||
let s:rexposn_{bufnr("%")}= winsaveview()
|
\ ? netrw#fs#ComposePath(b:netrw_curdir, fname)
|
||||||
if b:netrw_curdir =~ '/$'
|
\ : fname)
|
||||||
exe "NetrwKeepj e ".fnameescape(b:netrw_curdir.fname)
|
|
||||||
else
|
|
||||||
exe "e ".fnameescape(b:netrw_curdir."/".fname)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
exe "NetrwKeepj e ".fnameescape(fname)
|
|
||||||
endif
|
|
||||||
let @@= ykeep
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" netrw#Shrink: shrinks/expands a netrw or Lexplorer window {{{2
|
" netrw#Shrink: shrinks/expands a netrw or Lexplorer window {{{2
|
||||||
@ -6425,7 +6373,6 @@ function s:NetrwMenu(domenu)
|
|||||||
exe 'sil! menu '.g:NetrwMenuPriority.'.14.8 '.g:NetrwTopLvlMenu.'Marked\ Files.Exe\ Cmd<tab>mx mx'
|
exe 'sil! menu '.g:NetrwMenuPriority.'.14.8 '.g:NetrwTopLvlMenu.'Marked\ Files.Exe\ Cmd<tab>mx mx'
|
||||||
exe 'sil! menu '.g:NetrwMenuPriority.'.14.9 '.g:NetrwTopLvlMenu.'Marked\ Files.Move\ To\ Target<tab>mm mm'
|
exe 'sil! menu '.g:NetrwMenuPriority.'.14.9 '.g:NetrwTopLvlMenu.'Marked\ Files.Move\ To\ Target<tab>mm mm'
|
||||||
exe 'sil! menu '.g:NetrwMenuPriority.'.14.10 '.g:NetrwTopLvlMenu.'Marked\ Files.Obtain<tab>O O'
|
exe 'sil! menu '.g:NetrwMenuPriority.'.14.10 '.g:NetrwTopLvlMenu.'Marked\ Files.Obtain<tab>O O'
|
||||||
exe 'sil! menu '.g:NetrwMenuPriority.'.14.11 '.g:NetrwTopLvlMenu.'Marked\ Files.Print<tab>mp mp'
|
|
||||||
exe 'sil! menu '.g:NetrwMenuPriority.'.14.12 '.g:NetrwTopLvlMenu.'Marked\ Files.Replace<tab>R R'
|
exe 'sil! menu '.g:NetrwMenuPriority.'.14.12 '.g:NetrwTopLvlMenu.'Marked\ Files.Replace<tab>R R'
|
||||||
exe 'sil! menu '.g:NetrwMenuPriority.'.14.13 '.g:NetrwTopLvlMenu.'Marked\ Files.Set\ Target<tab>mt mt'
|
exe 'sil! menu '.g:NetrwMenuPriority.'.14.13 '.g:NetrwTopLvlMenu.'Marked\ Files.Set\ Target<tab>mt mt'
|
||||||
exe 'sil! menu '.g:NetrwMenuPriority.'.14.14 '.g:NetrwTopLvlMenu.'Marked\ Files.Tag<tab>mT mT'
|
exe 'sil! menu '.g:NetrwMenuPriority.'.14.14 '.g:NetrwTopLvlMenu.'Marked\ Files.Tag<tab>mT mT'
|
||||||
|
|||||||
12
runtime/pack/dist/opt/netrw/doc/netrw.txt
vendored
12
runtime/pack/dist/opt/netrw/doc/netrw.txt
vendored
@ -90,7 +90,6 @@ Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright*
|
|||||||
Marked Files: Grep..................................|netrw-mg|
|
Marked Files: Grep..................................|netrw-mg|
|
||||||
Marked Files: Hiding and Unhiding by Suffix.........|netrw-mh|
|
Marked Files: Hiding and Unhiding by Suffix.........|netrw-mh|
|
||||||
Marked Files: Moving................................|netrw-mm|
|
Marked Files: Moving................................|netrw-mm|
|
||||||
Marked Files: Printing..............................|netrw-mp|
|
|
||||||
Marked Files: Sourcing..............................|netrw-ms|
|
Marked Files: Sourcing..............................|netrw-ms|
|
||||||
Marked Files: Setting the Target Directory..........|netrw-mt|
|
Marked Files: Setting the Target Directory..........|netrw-mt|
|
||||||
Marked Files: Tagging...............................|netrw-mT|
|
Marked Files: Tagging...............................|netrw-mT|
|
||||||
@ -1066,7 +1065,6 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
|
|||||||
mg Apply vimgrep to marked files |netrw-mg|
|
mg Apply vimgrep to marked files |netrw-mg|
|
||||||
mh Toggle marked file suffices' presence on hiding list |netrw-mh|
|
mh Toggle marked file suffices' presence on hiding list |netrw-mh|
|
||||||
mm Move marked files to marked-file target directory |netrw-mm|
|
mm Move marked files to marked-file target directory |netrw-mm|
|
||||||
mp Print marked files |netrw-mp|
|
|
||||||
mr Mark files using a shell-style |regexp| |netrw-mr|
|
mr Mark files using a shell-style |regexp| |netrw-mr|
|
||||||
mt Current browsing directory becomes markfile target |netrw-mt|
|
mt Current browsing directory becomes markfile target |netrw-mt|
|
||||||
mT Apply ctags to marked files |netrw-mT|
|
mT Apply ctags to marked files |netrw-mT|
|
||||||
@ -2001,7 +1999,6 @@ The following netrw maps make use of marked files:
|
|||||||
|netrw-mF| Unmark marked files
|
|netrw-mF| Unmark marked files
|
||||||
|netrw-mg| Apply vimgrep to marked files
|
|netrw-mg| Apply vimgrep to marked files
|
||||||
|netrw-mm| Move marked files to target
|
|netrw-mm| Move marked files to target
|
||||||
|netrw-mp| Print marked files
|
|
||||||
|netrw-ms| Netrw will source marked files
|
|netrw-ms| Netrw will source marked files
|
||||||
|netrw-mt| Set target for |netrw-mm| and |netrw-mc|
|
|netrw-mt| Set target for |netrw-mm| and |netrw-mc|
|
||||||
|netrw-mT| Generate tags using marked files
|
|netrw-mT| Generate tags using marked files
|
||||||
@ -2266,15 +2263,6 @@ from the current window (where one does the mf) to the target.
|
|||||||
|
|
||||||
Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
|
Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
|
||||||
|
|
||||||
MARKED FILES: PRINTING *netrw-mp* {{{2
|
|
||||||
(See |netrw-mf| and |netrw-mr| for how to mark files)
|
|
||||||
(uses the local marked file list)
|
|
||||||
|
|
||||||
When "mp" is used, netrw will apply the |:hardcopy| command to marked files.
|
|
||||||
What netrw does is open each file in a one-line window, execute hardcopy, then
|
|
||||||
close the one-line window.
|
|
||||||
|
|
||||||
|
|
||||||
MARKED FILES: SOURCING *netrw-ms* {{{2
|
MARKED FILES: SOURCING *netrw-ms* {{{2
|
||||||
(See |netrw-mf| and |netrw-mr| for how to mark files)
|
(See |netrw-mf| and |netrw-mr| for how to mark files)
|
||||||
(uses the local marked file list)
|
(uses the local marked file list)
|
||||||
|
|||||||
@ -15,7 +15,7 @@ if &cp || exists("g:loaded_netrwPlugin")
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:loaded_netrwPlugin = "v183"
|
let g:loaded_netrwPlugin = "v184"
|
||||||
|
|
||||||
let s:keepcpo = &cpo
|
let s:keepcpo = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|||||||
Reference in New Issue
Block a user