From 6b7892dc7b4b18e48a6439d1bad860947ce32d03 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 28 Aug 2021 11:40:29 -0400 Subject: [PATCH] Fix edge case in s:Map() short circuiting When called with multiple modes, don't bail after the first disabled mode. This also restructures in a way to allow for transition to :exe s:Map(), which will provide the correct line number on :verbose map . --- autoload/fugitive.vim | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index e5684e4..1f69e52 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -199,33 +199,35 @@ endfunction let s:nowait = v:version >= 704 ? '' : '' function! s:Map(mode, lhs, rhs, ...) abort + let maps = [] for mode in split(a:mode, '\zs') + let skip = 0 let flags = (a:0 ? a:1 : '') . (a:rhs =~# '' ? '' : '