gitgutter#utility#setbufvar: ensure bufnr is a number with setbufvar

Otherwise you might get "E93: More than one match for X" if there is a
buffer with "X" in its name besides buffer number X.
This commit is contained in:
Daniel Hahler
2018-04-19 13:52:03 +02:00
committed by Andy Stewart
parent f167c3312b
commit 22c3fc0bf5

View File

@@ -11,7 +11,7 @@ function! gitgutter#utility#setbufvar(buffer, varname, val)
let needs_setting = empty(dict)
let dict[a:varname] = a:val
if needs_setting
call setbufvar(a:buffer, 'gitgutter', dict)
call setbufvar(+a:buffer, 'gitgutter', dict)
endif
endfunction