From e6651a79facf5cc2b7c554fdc19eb8a9fe89602c Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 14 Apr 2023 15:12:13 -0400 Subject: [PATCH] Allow ftplugin maps to override historical buffer maps Resolves: https://github.com/tpope/vim-fugitive/issues/2151 --- autoload/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 04ed1e9..be22420 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -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', ":let b:fugitive_display_format += v:count1exe fugitive#BufReadCmd(@%)", '') call s:Map('n', 'i', ":let b:fugitive_display_format -= v:count1exe fugitive#BufReadCmd(@%)", '') + setlocal filetype=git endif - call fugitive#MapJumps() endtry setlocal modifiable