diff options
author | MiguelBarro <45819833+MiguelBarro@users.noreply.github.com> | 2024-01-31 20:07:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-31 20:07:17 +0100 |
commit | c46c21b4ca476c0846a410d7c4d8c6e3e930f167 (patch) | |
tree | e8832304b6fd115b2995e2740652b551c04fd9c1 | |
parent | 0a3d36968737ad70bf234b6cc438230911b14f9c (diff) |
runtime(netrw): fixing remote file removal via ssh (#13942)
Make pattern, which retrieves the path component from e.g.
`scp://user@host//opt/program/file.ext` non-greedy.
Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
-rw-r--r-- | runtime/autoload/netrw.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 0006d133cc..d9baabb011 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -10668,7 +10668,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>")) |