mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 13:23:52 -05:00
Don't treat buftype=nofile buffer names as file names
Resolves: https://github.com/tpope/vim-fugitive/issues/1905
This commit is contained in:
@@ -7221,7 +7221,7 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, ...) abor
|
|||||||
endif
|
endif
|
||||||
exe s:DirCheck(dir)
|
exe s:DirCheck(dir)
|
||||||
if empty(expanded)
|
if empty(expanded)
|
||||||
let bufname = s:BufName('%')
|
let bufname = &buftype =~# '^\%(nofile\|terminal\)$' ? '' : s:BufName('%')
|
||||||
let expanded = s:DirRev(bufname)[1]
|
let expanded = s:DirRev(bufname)[1]
|
||||||
if empty(expanded)
|
if empty(expanded)
|
||||||
let expanded = fugitive#Path(bufname, ':(top)', dir)
|
let expanded = fugitive#Path(bufname, ':(top)', dir)
|
||||||
|
|||||||
Reference in New Issue
Block a user