Skip to content

Commit 688c135

Browse files
committed
Just escape [ to avoid unnecessary escaping
see :help wildcards. Replacing to `\[` does not work on Windows.
1 parent 81693a4 commit 688c135

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugin/unimpaired.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ call s:MapNextFamily('t', 't', 'trewind')
7777

7878
function! s:entries(path) abort
7979
let path = substitute(a:path,'[\\/]$','','')
80-
let files = split(glob(fnameescape(path)."/.*"),"\n")
81-
let files += split(glob(fnameescape(path)."/*"),"\n")
80+
let path = substitute(path, '[', '[[]', '')
81+
let files = split(glob(path."/.*"),"\n")
82+
let files += split(glob(path."/*"),"\n")
8283
call map(files,'substitute(v:val,"[\\/]$","","")')
8384
call filter(files,'v:val !~# "[\\\\/]\\.\\.\\=$"')
8485

0 commit comments

Comments
 (0)