vim-patch:c46c21b4ca47

runtime(netrw): fixing remote file removal via ssh (vim/vim#13942)

Make pattern, which retrieves the path component from e.g.
`scp://user@host//opt/program/file.ext` non-greedy.

c46c21b4ca

Co-authored-by: MiguelBarro <45819833+MiguelBarro@users.noreply.github.com>
This commit is contained in:
Christian Clason 2024-02-01 09:33:02 +01:00
parent e0961aaa5a
commit 0da18ae5ce

View File

@ -10558,7 +10558,7 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all)
NetrwKeepj call netrw#ErrorMsg(s:ERROR,"for some reason b:netrw_curdir doesn't exist!",53)
let ok="q"
else
let remotedir= substitute(b:netrw_curdir,'^.*//[^/]\+/\(.*\)$','\1','')
let remotedir= substitute(b:netrw_curdir,'^.\{-}//[^/]\+/\(.*\)$','\1','')
" call Decho("netrw_rm_cmd<".netrw_rm_cmd.">",'~'.expand("<slnum>"))
" call Decho("remotedir<".remotedir.">",'~'.expand("<slnum>"))
" call Decho("rmfile<".a:rmfile.">",'~'.expand("<slnum>"))