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 Dec 21, 2018
1 parent 5c3316c commit beaeb9f
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 @@ -235,8 +235,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 beaeb9f

Please sign in to comment.