Skip to content

Commit c46c21b

Browse files
authored
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 <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent 0a3d369 commit c46c21b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

runtime/autoload/netrw.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10668,7 +10668,7 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all)
1066810668
NetrwKeepj call netrw#ErrorMsg(s:ERROR,"for some reason b:netrw_curdir doesn't exist!",53)
1066910669
let ok="q"
1067010670
else
10671-
let remotedir= substitute(b:netrw_curdir,'^.*//[^/]\+/\(.*\)$','\1','')
10671+
let remotedir= substitute(b:netrw_curdir,'^.\{-}//[^/]\+/\(.*\)$','\1','')
1067210672
" call Decho("netrw_rm_cmd<".netrw_rm_cmd.">",'~'.expand("<slnum>"))
1067310673
" call Decho("remotedir<".remotedir.">",'~'.expand("<slnum>"))
1067410674
" call Decho("rmfile<".a:rmfile.">",'~'.expand("<slnum>"))

0 commit comments

Comments
 (0)