Skip to content

Commit

Permalink
Truncate expand() result to one pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Sep 19, 2010
1 parent 452e951 commit dc3448e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions autoload.vim
Expand Up @@ -48,8 +48,7 @@ function! s:open_at_cursor()
let match .= matchstr(line[idx+1 : -1], '^\f*')
" Expand leading tilde and/or environment variables in filename?
if match =~ '^\~' || match =~ '\$'
" TODO This can return multiple files?!
let match = expand(match)
let match = split(expand(match), "\n")[0]
endif
if match != '' && (isdirectory(match) || filereadable(match))
call xolox#open#file(match)
Expand Down

0 comments on commit dc3448e

Please sign in to comment.