aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-05-11 09:31:42 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-05-11 09:52:03 +0200
commit6ec6fafd6618512c26954b7e675d7f0b5771df0f (patch)
treed6aa8254198cb6269d758a5baa317c5af19f702f
parent7f500289ebbf820cf944964a15d2a3d8147ceb77 (diff)
downloadrneovim-6ec6fafd6618512c26954b7e675d7f0b5771df0f.tar.gz
rneovim-6ec6fafd6618512c26954b7e675d7f0b5771df0f.tar.bz2
rneovim-6ec6fafd6618512c26954b7e675d7f0b5771df0f.zip
vim-patch:c16c4a21eb39
runtime(netrw): Recursively delete directories by default with netrw delete command closes: vim/vim#14742 https://github.com/vim/vim/commit/c16c4a21eb397634309f1f574811461d6154118d Co-authored-by: Nir Lichtman <nir@lichtman.org>
-rw-r--r--runtime/autoload/netrw.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index ac74d047ac..117b44b284 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
@@ -11346,7 +11347,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 == ""
@@ -11359,7 +11360,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