commit 0da18ae5ceb2a53115332d3f6993437cca67b9b4
parent e0961aaa5aa6e2dc39be688ccf8072e7bc616780
Author: Christian Clason <c.clason@uni-graz.at>
Date: Thu, 1 Feb 2024 09:33:02 +0100
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.
https://github.com/vim/vim/commit/c46c21b4ca476c0846a410d7c4d8c6e3e930f167
Co-authored-by: MiguelBarro <45819833+MiguelBarro@users.noreply.github.com>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
@@ -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>"))