Skip to content

Commit

Permalink
fixup! fixup! complete_files: more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Mar 13, 2018
1 parent 9591a26 commit 48d60d8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugin/grepper.vim
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ function! grepper#complete_files(lead, _line, _pos)
" handle paths in $HOME (~/foo)
if path[0:1] ==# '~/'
let home = expand('~')
let home_len = len(home)
return map(split(globpath(home, path[2:].'*'), '\n'), "head . '~' . v:val[home_len:] . (isdirectory(v:val) ? s:slash : '')")
return map(split(globpath(home, path[2:].'*'), '\n'), "head . '~' . v:val[".len(home).":] . (isdirectory(v:val) ? s:slash : '')")
" handle (explicit) relative paths
elseif path[0:1] ==# './'
return map(split(globpath('.'.s:slash, path[2:].'*'), '\n'), "head . v:val . (isdirectory(v:val) ? s:slash : '')")
Expand Down

0 comments on commit 48d60d8

Please sign in to comment.