mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 06:13:51 -05:00
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:
@@ -275,8 +275,9 @@ endfunction
|
|||||||
|
|
||||||
function! s:Map(mode, lhs, rhs, ...) abort
|
function! s:Map(mode, lhs, rhs, ...) abort
|
||||||
let maps = []
|
let maps = []
|
||||||
let defer = a:0 && a:1 =~# '<unique>' || get(g:, 'fugitive_defer_to_existing_maps')
|
let flags = a:0 && type(a:1) == type('') ? a:1 : ''
|
||||||
let flags = substitute(a:0 ? a:1 : '', '<unique>', '', '') . (a:rhs =~# '<Plug>' ? '' : '<script>') . '<nowait>'
|
let defer = flags =~# '<unique>'
|
||||||
|
let flags = substitute(flags, '<unique>', '', '') . (a:rhs =~# '<Plug>' ? '' : '<script>') . '<nowait>'
|
||||||
for mode in split(a:mode, '\zs')
|
for mode in split(a:mode, '\zs')
|
||||||
if a:0 <= 1
|
if a:0 <= 1
|
||||||
call add(maps, mode.'map <buffer>' . substitute(flags, '<unique>', '', '') . ' <Plug>fugitive:' . a:lhs . ' ' . a:rhs)
|
call add(maps, mode.'map <buffer>' . substitute(flags, '<unique>', '', '') . ' <Plug>fugitive:' . a:lhs . ' ' . a:rhs)
|
||||||
|
|||||||
Reference in New Issue
Block a user