mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 12:53:52 -05:00
Support blank buffers
Closes https://github.com/tpope/vim-fugitive/issues/1000
This commit is contained in:
@@ -11,8 +11,7 @@ let g:loaded_fugitive = 1
|
||||
function! FugitiveGitDir(...) abort
|
||||
if !a:0 || type(a:1) == type(0) && a:1 < 0
|
||||
let dir = get(b:, 'git_dir', '')
|
||||
if empty(dir) && get(g:, 'fugitive_blank_buffer_2019_alpha') && strftime('%Y') == 2019 &&
|
||||
\ (empty(bufname('')) || &buftype =~# '^\%(nofile\|acwrite\|quickfix\|prompt\)$')
|
||||
if empty(dir) && (empty(bufname('')) || &buftype =~# '^\%(nofile\|acwrite\|quickfix\|prompt\)$')
|
||||
return FugitiveExtractGitDir(getcwd())
|
||||
endif
|
||||
return dir
|
||||
|
||||
Reference in New Issue
Block a user