Skip to content

Commit 48d60d8

Browse files
committed
fixup! fixup! complete_files: more fixes
1 parent 9591a26 commit 48d60d8

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
@@ -239,8 +239,7 @@ function! grepper#complete_files(lead, _line, _pos)
239239
" handle paths in $HOME (~/foo)
240240
if path[0:1] ==# '~/'
241241
let home = expand('~')
242-
let home_len = len(home)
243-
return map(split(globpath(home, path[2:].'*'), '\n'), "head . '~' . v:val[home_len:] . (isdirectory(v:val) ? s:slash : '')")
242+
return map(split(globpath(home, path[2:].'*'), '\n'), "head . '~' . v:val[".len(home).":] . (isdirectory(v:val) ? s:slash : '')")
244243
" handle (explicit) relative paths
245244
elseif path[0:1] ==# './'
246245
return map(split(globpath('.'.s:slash, path[2:].'*'), '\n'), "head . v:val . (isdirectory(v:val) ? s:slash : '')")

0 commit comments

Comments
 (0)