From a81ba999e8a48e4b86beef84714ad4ad3dd1ff84 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 18 Feb 2020 16:46:25 -0500 Subject: [PATCH] Correctly treat config keys without values as true --- autoload/fugitive.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 3ed6660..a8d8a75 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -639,7 +639,11 @@ function! fugitive#Config(...) abort if !has_key(dict, key) let dict[key] = [] endif - call add(dict[key], strpart(line, len(key) + 1)) + if len(key) ==# len(line) + call add(dict[key], 1) + else + call add(dict[key], strpart(line, len(key) + 1)) + endif endfor let s:config[dir] = [s:ConfigTimestamps(dir, dict), dict] lockvar! dict