From 7f299fbbe3a520e88482967d59e59868a1f58fe6 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 27 Jul 2018 00:14:47 -0400 Subject: [PATCH] Eliminate remaining uses of s:buffer().type() --- autoload/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 6f2d560..d3fabfc 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -1326,7 +1326,7 @@ function! s:Commit(mods, args, ...) abort execute mods 'keepalt edit' s:fnameescape(msgfile) elseif a:args =~# '\%(^\| \)-\w*v' || mods =~# '\' execute mods 'keepalt -tabedit' s:fnameescape(msgfile) - elseif s:buffer().type() ==# 'index' + elseif get(b:, 'fugitive_type', '') ==# 'index' execute mods 'keepalt edit' s:fnameescape(msgfile) execute (search('^#','n')+1).'wincmd+' setlocal nopreviewwindow @@ -1722,7 +1722,7 @@ function! s:Write(force,...) abort return 'write|bdelete' elseif expand('%:t') == 'COMMIT_EDITMSG' && $GIT_INDEX_FILE != '' return 'wq' - elseif s:buffer().type() == 'index' + elseif get(b:, 'fugitive_type', '') ==# 'index' return 'Gcommit' elseif s:Relative('') ==# '' && getline(4) =~# '^+++ ' let filename = getline(4)[6:-1]