aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-07-22 23:13:10 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-07-23 00:30:30 +0200
commit9322b7e0594de77f8c0f6ef34c197b8a3aac7844 (patch)
tree3bc4f245c5bb0669af7d511472ce43cceb0150f9 /runtime
parent79d492a4218ee6b4da5becbebb712a0f1f65d0f5 (diff)
downloadrneovim-9322b7e0594de77f8c0f6ef34c197b8a3aac7844.tar.gz
rneovim-9322b7e0594de77f8c0f6ef34c197b8a3aac7844.tar.bz2
rneovim-9322b7e0594de77f8c0f6ef34c197b8a3aac7844.zip
vim-patch:9d57ea5: runtime(netrw): Fix endless recursion in netrw#Explore()
Problem: ':E /etc BOOM' give E132 error. Solution: Avoid recursion call with same arguments. fixes: vim/vim#5723 closes: vim/vim#15318 https://github.com/vim/vim/commit/9d57ea5cd3a23af02c72c0e86fe24b7bba57189a Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/netrw.vim12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index 0ac216e8b2..b4d7743236 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -16,6 +16,7 @@
" 2024 Jun 04 by Vim Project: set bufhidden if buffer changed, nohidden is set and buffer shall be switched (#14915)
" 2024 Jun 13 by Vim Project: glob() on Windows fails when a directory name contains [] (#14952)
" 2024 Jun 23 by Vim Project: save ad restore registers when liststyle = WIDELIST (#15077, #15114)
+" 2024 Jul 22 by Vim Project: avoid endless recursion (#15318)
" Former Maintainer: Charles E Campbell
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
@@ -692,12 +693,11 @@ fun! netrw#Explore(indx,dosplit,style,...)
\ ((isdirectory(s:NetrwFile(a:1))))? 'is a directory' : 'is not a directory',
\ '~'.expand("<slnum>"))
if a:1 =~ "\\\s" && !filereadable(s:NetrwFile(a:1)) && !isdirectory(s:NetrwFile(a:1))
-" call Decho("re-trying Explore with <".substitute(a:1,'\\\(\s\)','\1','g').">",'~'.expand("<slnum>"))
- call netrw#Explore(a:indx,a:dosplit,a:style,substitute(a:1,'\\\(\s\)','\1','g'))
-" call Dret("netrw#Explore : returning from retry")
- return
-" else " Decho
-" call Decho("retry not needed",'~'.expand("<slnum>"))
+ let a1 = substitute(a:1, '\\\(\s\)', '\1', 'g')
+ if a1 != a:1
+ call netrw#Explore(a:indx, a:dosplit, a:style, a1)
+ return
+ endif
endif
endif