Correctly treat config keys without values as true

This commit is contained in:
Tim Pope
2020-02-18 16:46:25 -05:00
parent cb1300d751
commit a81ba999e8

View File

@@ -639,7 +639,11 @@ function! fugitive#Config(...) abort
if !has_key(dict, key) if !has_key(dict, key)
let dict[key] = [] let dict[key] = []
endif 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 endfor
let s:config[dir] = [s:ConfigTimestamps(dir, dict), dict] let s:config[dir] = [s:ConfigTimestamps(dir, dict), dict]
lockvar! dict lockvar! dict