runtime(netrw): fixing remote file removal via ssh (#13942) Commit: https://github.com/vim/vim/commit/c46c21b4ca476c0846a410d7c4d8c6e3e930f167 Author: MiguelBarro <45819833+miguelba...@users.noreply.github.com> Date: Wed Jan 31 20:07:17 2024 +0100
runtime(netrw): fixing remote file removal via ssh (https://github.com/vim/vim/issues/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.ba...@live.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 0006d133c..d9baabb01 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,'^.*//[^/]\+/\(.*\)$',' ','') + let remotedir= substitute(b:netrw_curdir,'^.\{-}//[^/]\+/\(.*\)$',' ','') " call Decho("netrw_rm_cmd<".netrw_rm_cmd.">",'~'.expand("<slnum>")) " call Decho("remotedir<".remotedir.">",'~'.expand("<slnum>")) " call Decho("rmfile<".a:rmfile.">",'~'.expand("<slnum>")) -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1rVG3A-005wCE-IU%40256bit.org.