Mercurial > vim
changeset 34247:89749c7abd48
runtime(netrw): fixing remote file removal via ssh (#13942)
Commit: https://github.com/vim/vim/commit/c46c21b4ca476c0846a410d7c4d8c6e3e930f167
Author: MiguelBarro <45819833+MiguelBarro@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.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 31 Jan 2024 20:15:08 +0100 |
parents | 752da4c70ab4 |
children | 2d13a3713a05 |
files | runtime/autoload/netrw.vim |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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>"))