Drop g:fugitive_defer_to_existing_maps

This doesn't actually work correctly as in a few places we deliberately
override a map.  I'll accept a PR to bring it back, but it will need to
fix said issues.  Until then, unmapping undesired maps is the
recommended solution.
This commit is contained in:
Tim Pope
2023-02-27 21:47:40 -05:00
parent ad2dcd628a
commit d507d00bd0

View File

@@ -275,8 +275,9 @@ endfunction
function! s:Map(mode, lhs, rhs, ...) abort
let maps = []
let defer = a:0 && a:1 =~# '<unique>' || get(g:, 'fugitive_defer_to_existing_maps')
let flags = substitute(a:0 ? a:1 : '', '<unique>', '', '') . (a:rhs =~# '<Plug>' ? '' : '<script>') . '<nowait>'
let flags = a:0 && type(a:1) == type('') ? a:1 : ''
let defer = flags =~# '<unique>'
let flags = substitute(flags, '<unique>', '', '') . (a:rhs =~# '<Plug>' ? '' : '<script>') . '<nowait>'
for mode in split(a:mode, '\zs')
if a:0 <= 1
call add(maps, mode.'map <buffer>' . substitute(flags, '<unique>', '', '') . ' <Plug>fugitive:' . a:lhs . ' ' . a:rhs)