mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-17 07:43:44 -05:00
Eliminate remaining uses of s:buffer().type()
This commit is contained in:
@@ -1326,7 +1326,7 @@ function! s:Commit(mods, args, ...) abort
|
||||
execute mods 'keepalt edit' s:fnameescape(msgfile)
|
||||
elseif a:args =~# '\%(^\| \)-\w*v' || mods =~# '\<tab\>'
|
||||
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]
|
||||
|
||||
Reference in New Issue
Block a user