mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Do not pass a default value to getbufvar().
That was introduced in Vim 7.3.831 but there are a few Vims older than
that still around.
See:
af1e674155 (commitcomment-31431773)
This commit is contained in:
@@ -8,7 +8,12 @@ endfunction
|
||||
|
||||
function! gitgutter#utility#setbufvar(buffer, varname, val)
|
||||
let buffer = +a:buffer
|
||||
let dict = get(getbufvar(buffer, '', {}), 'gitgutter', {})
|
||||
" Default value for getbufvar() was introduced in Vim 7.3.831.
|
||||
let bvars = getbufvar(buffer, '')
|
||||
if empty(bvars)
|
||||
let bvars = {}
|
||||
endif
|
||||
let dict = get(bvars, 'gitgutter', {})
|
||||
let needs_setting = empty(dict)
|
||||
let dict[a:varname] = a:val
|
||||
if needs_setting
|
||||
|
||||
Reference in New Issue
Block a user