Don't blow up on type checking empty buffers

Closes #462.
This commit is contained in:
Tim Pope 2014-03-31 19:14:57 -04:00
parent 51cdb1b190
commit 17393f552e

View File

@ -468,7 +468,7 @@ function! s:buffer_setvar(var,value) dict abort
endfunction
function! s:buffer_getline(lnum) dict abort
return getbufline(bufname(self['#']), a:lnum)[0]
return get(getbufline(bufname(self['#']), a:lnum), 0, '')
endfunction
function! s:buffer_repo() dict abort