mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-16 07:13:52 -05:00
Don't consider buftype=acwrite buffers to have real filenames
Immediately after I changed this I rediscovered the documentation at `:help E676`.
This commit is contained in:
@@ -23,9 +23,9 @@ function! FugitiveGitDir(...) abort
|
|||||||
return g:fugitive_event
|
return g:fugitive_event
|
||||||
endif
|
endif
|
||||||
let dir = get(b:, 'git_dir', '')
|
let dir = get(b:, 'git_dir', '')
|
||||||
if empty(dir) && (empty(bufname('')) || &buftype =~# '^\%(nofile\|quickfix\|terminal\|prompt\)$')
|
if empty(dir) && (empty(bufname('')) || &buftype =~# '^\%(nofile\|acwrite\|quickfix\|terminal\|prompt\)$')
|
||||||
return FugitiveExtractGitDir(getcwd())
|
return FugitiveExtractGitDir(getcwd())
|
||||||
elseif (!exists('b:git_dir') || b:git_dir =~# s:bad_git_dir) && &buftype =~# '^\%(nowrite\|acwrite\)\=$'
|
elseif (!exists('b:git_dir') || b:git_dir =~# s:bad_git_dir) && &buftype =~# '^\%(nowrite\)\=$'
|
||||||
let b:git_dir = FugitiveExtractGitDir(bufnr(''))
|
let b:git_dir = FugitiveExtractGitDir(bufnr(''))
|
||||||
return b:git_dir
|
return b:git_dir
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user