Fix check for maps disabled by dictionary

Resolves: https://github.com/tpope/vim-fugitive/issues/1822
This commit is contained in:
Tim Pope
2021-08-31 16:32:48 -04:00
parent 2b37219021
commit 2016ce1db4

View File

@@ -218,7 +218,7 @@ function! s:Map(mode, lhs, rhs, ...) abort
let tail = matchstr(head, '<[^<>]*>$\|.$') . tail
let head = substitute(head, '<[^<>]*>$\|.$', '', '')
endwhile
if !skip && flags !~# '<unique>' || empty(mapcheck(head.tail, mode))
if !skip && (flags !~# '<unique>' || empty(mapcheck(head.tail, mode)))
call add(maps, mode.'map <buffer>' . s:nowait . flags . ' ' . head.tail . ' ' . a:rhs)
if a:0 > 1
let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'exe') .