Allow ftplugin maps to override historical buffer maps

Resolves: https://github.com/tpope/vim-fugitive/issues/2151
This commit is contained in:
Tim Pope
2023-04-14 15:12:13 -04:00
parent ef99f1d90c
commit e6651a79fa

View File

@@ -3188,12 +3188,12 @@ function! fugitive#BufReadCmd(...) abort
setlocal bufhidden=delete
endif
let &l:modifiable = modifiable
call fugitive#MapJumps()
if b:fugitive_type !=# 'blob'
setlocal filetype=git
call s:Map('n', 'a', ":<C-U>let b:fugitive_display_format += v:count1<Bar>exe fugitive#BufReadCmd(@%)<CR>", '<silent>')
call s:Map('n', 'i', ":<C-U>let b:fugitive_display_format -= v:count1<Bar>exe fugitive#BufReadCmd(@%)<CR>", '<silent>')
setlocal filetype=git
endif
call fugitive#MapJumps()
endtry
setlocal modifiable