|
16 | 16 | " 2024 Jun 04 by Vim Project: set bufhidden if buffer changed, nohidden is set and buffer shall be switched (#14915) |
17 | 17 | " 2024 Jun 13 by Vim Project: glob() on Windows fails when a directory name contains [] (#14952) |
18 | 18 | " 2024 Jun 23 by Vim Project: save ad restore registers when liststyle = WIDELIST (#15077, #15114) |
| 19 | +" 2024 Jul 22 by Vim Project: avoid endless recursion (#15318) |
19 | 20 | " Former Maintainer: Charles E Campbell |
20 | 21 | " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim |
21 | 22 | " Copyright: Copyright (C) 2016 Charles E. Campbell {{{1 |
@@ -694,12 +695,11 @@ fun! netrw#Explore(indx,dosplit,style,...) |
694 | 695 | \ ((isdirectory(s:NetrwFile(a:1))))? 'is a directory' : 'is not a directory', |
695 | 696 | \ '~'.expand("<slnum>")) |
696 | 697 | if a:1 =~ "\\\s" && !filereadable(s:NetrwFile(a:1)) && !isdirectory(s:NetrwFile(a:1)) |
697 | | -" call Decho("re-trying Explore with <".substitute(a:1,'\\\(\s\)','\1','g').">",'~'.expand("<slnum>")) |
698 | | - call netrw#Explore(a:indx,a:dosplit,a:style,substitute(a:1,'\\\(\s\)','\1','g')) |
699 | | -" call Dret("netrw#Explore : returning from retry") |
700 | | - return |
701 | | -" else " Decho |
702 | | -" call Decho("retry not needed",'~'.expand("<slnum>")) |
| 698 | + let a1 = substitute(a:1, '\\\(\s\)', '\1', 'g') |
| 699 | + if a1 != a:1 |
| 700 | + call netrw#Explore(a:indx, a:dosplit, a:style, a1) |
| 701 | + return |
| 702 | + endif |
703 | 703 | endif |
704 | 704 | endif |
705 | 705 |
|
|
0 commit comments