Skip to content

Commit beaeb9f

Browse files
committed
fixup! fixup! complete_files: more fixes
1 parent 5c3316c commit beaeb9f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plugin/grepper.vim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,7 @@ function! grepper#complete_files(lead, _line, _pos)
235235
" handle paths in $HOME (~/foo)
236236
if path[0:1] ==# '~/'
237237
let home = expand('~')
238-
let home_len = len(home)
239-
return map(split(globpath(home, path[2:].'*'), '\n'), "head . '~' . v:val[home_len:] . (isdirectory(v:val) ? s:slash : '')")
238+
return map(split(globpath(home, path[2:].'*'), '\n'), "head . '~' . v:val[".len(home).":] . (isdirectory(v:val) ? s:slash : '')")
240239
" handle (explicit) relative paths
241240
elseif path[0:1] ==# './'
242241
return map(split(globpath('.'.s:slash, path[2:].'*'), '\n'), "head . v:val . (isdirectory(v:val) ? s:slash : '')")

0 commit comments

Comments
 (0)