Skip to content
Browse files

Truncate expand() result to one pathname

  • Loading branch information...
1 parent 452e951 commit dc3448ec7f3a66b171995de8d08a9f4193cb4c0c @xolox committed
Showing with 1 addition and 2 deletions.
  1. +1 −2 autoload.vim
View
3 autoload.vim
@@ -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)

0 comments on commit dc3448e

Please sign in to comment.
Something went wrong with that request. Please try again.