From 17393f552e3a51dd010f403073592bf0a6170098 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 31 Mar 2014 19:14:57 -0400 Subject: [PATCH] Don't blow up on type checking empty buffers Closes #462. --- plugin/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index a026b6c..4e541cd 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -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