mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 13:23:52 -05:00
Set bufhidden=delete in historical buffers
This commit is contained in:
@@ -1753,6 +1753,9 @@ function! s:BufReadIndexFile()
|
|||||||
let b:fugitive_type = 'blob'
|
let b:fugitive_type = 'blob'
|
||||||
let b:git_dir = s:repo().dir()
|
let b:git_dir = s:repo().dir()
|
||||||
call s:ReplaceCmd(s:repo().git_command('cat-file','blob',s:buffer().sha1()))
|
call s:ReplaceCmd(s:repo().git_command('cat-file','blob',s:buffer().sha1()))
|
||||||
|
if &bufhidden ==# ''
|
||||||
|
setlocal bufhidden=delete
|
||||||
|
endif
|
||||||
return ''
|
return ''
|
||||||
catch /^fugitive: rev-parse/
|
catch /^fugitive: rev-parse/
|
||||||
silent exe 'doau BufNewFile '.s:fnameescape(bufname(''))
|
silent exe 'doau BufNewFile '.s:fnameescape(bufname(''))
|
||||||
@@ -1849,6 +1852,9 @@ function! s:BufReadObject()
|
|||||||
endif
|
endif
|
||||||
call setpos('.',pos)
|
call setpos('.',pos)
|
||||||
setlocal ro noma nomod nomodeline
|
setlocal ro noma nomod nomodeline
|
||||||
|
if &bufhidden ==# ''
|
||||||
|
setlocal bufhidden=delete
|
||||||
|
endif
|
||||||
if b:fugitive_type !=# 'blob'
|
if b:fugitive_type !=# 'blob'
|
||||||
set filetype=git
|
set filetype=git
|
||||||
nnoremap <buffer> <silent> a :<C-U>let b:fugitive_display_format += v:count1<Bar>exe <SID>BufReadObject()<CR>
|
nnoremap <buffer> <silent> a :<C-U>let b:fugitive_display_format += v:count1<Bar>exe <SID>BufReadObject()<CR>
|
||||||
|
|||||||
Reference in New Issue
Block a user