Skip to content

Commit be69bff

Browse files
committed
Fix regression in {} list expansion
Since 9a24c388a1080f46790bcd0f4c1fc61ed23b08d4. Resolves: #97 References: #95
1 parent cd9d382 commit be69bff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/sleuth.vim

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ function! s:FnmatchReplace(pat) abort
213213
return '\%(' . join(range(matchstr(a:pat, '[+-]\=\d\+'), matchstr(a:pat, '\.\.\zs[+-]\=\d\+')), '\|') . '\)'
214214
elseif a:pat =~# '^{.*\\\@<!\%(\\\\\)*,.*}$'
215215
let done = []
216-
let rest = ',' . a:pat
216+
let rest = a:pat[0:-2]
217217
while !empty(rest)
218-
let match = matchstr(done, '\%(\\.\|{[^\{}]*}\|[^,]\)*', 1)
218+
let match = matchstr(rest, '\%(\\.\|{[^\{}]*}\|[^,]\)*', 1)
219219
let rest = strpart(rest, len(match) + 1)
220220
call add(done, s:FnmatchTranslate(match))
221221
endwhile

0 commit comments

Comments
 (0)