From 2016ce1db416a362d6ebcc91eb936256c4199646 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 31 Aug 2021 16:32:48 -0400 Subject: [PATCH] Fix check for maps disabled by dictionary Resolves: https://github.com/tpope/vim-fugitive/issues/1822 --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 12cd3ac..1b8afe3 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -218,7 +218,7 @@ function! s:Map(mode, lhs, rhs, ...) abort let tail = matchstr(head, '<[^<>]*>$\|.$') . tail let head = substitute(head, '<[^<>]*>$\|.$', '', '') endwhile - if !skip && flags !~# '' || empty(mapcheck(head.tail, mode)) + if !skip && (flags !~# '' || empty(mapcheck(head.tail, mode))) call add(maps, mode.'map ' . s:nowait . flags . ' ' . head.tail . ' ' . a:rhs) if a:0 > 1 let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'exe') .