runtime(netrw): Recursively delete directories by default with netrw delete command
Commit: https://github.com/vim/vim/commit/c16c4a21eb397634309f1f574811461d6154118d Author: Nir Lichtman <n...@lichtman.org> Date: Fri May 10 23:43:29 2024 +0200 runtime(netrw): Recursively delete directories by default with netrw delete command closes: https://github.com/vim/vim/issues/14742 Signed-off-by: Nir Lichtman <n...@lichtman.org> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index f8335996a..4c95d2c71 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -11,6 +11,7 @@ " 2024 Apr 03 by Vim Project: detect filetypes for remote edited files " 2024 May 08 by Vim Project: cleanup legacy Win9X checks " 2024 May 09 by Vim Project: remove hard-coded private.ppk +" 2024 May 10 by Vim Project: recursively delete directories by default " Former Maintainer: Charles E Campbell " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 2016 Charles E. Campbell {{{1 @@ -11456,7 +11457,7 @@ fun! s:NetrwLocalRmFile(path,fname,all) if !all echohl Statement call inputsave() - let ok= input("Confirm deletion of directory<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") + let ok= input("Confirm *recursive* deletion of directory<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") call inputrestore() let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') if ok == "" @@ -11469,7 +11470,7 @@ fun! s:NetrwLocalRmFile(path,fname,all) let rmfile= substitute(rmfile,'[\/]$','','e') if all || ok =~# 'y\%[es]' || ok == "" - if delete(rmfile,"d") + if delete(rmfile,"rf") call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".rmfile.">!",103) endif endif -- -- 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/E1s5Y3N-00B8Fy-Ag%40256bit.org.