Don't call getbufvar() with a default value.

Support for a default value in getbufvar() was introduced some time
after Vim 7.3.547 which is the current stable version in some package
repositories.
This commit is contained in:
Andy Stewart
2014-01-09 10:05:49 +01:00
parent 03ca0f8d93
commit 7ce6309a01
2 changed files with 3 additions and 2 deletions

View File

@@ -10,7 +10,8 @@ let s:dummy_sign_id = s:first_sign_id - 1
" Removes gitgutter's signs from the given file.
function! sign#clear_signs(file_name)
for sign in getbufvar(a:file_name, 'gitgutter_gitgutter_signs', [])
let signs = getbufvar(a:file_name, 'gitgutter_gitgutter_signs')
for sign in (signs == '' ? [] : signs)
exe ":sign unplace" sign[1] "file=" . a:file_name
endfor
call setbufvar(a:file_name, 'gitgutter_gitgutter_signs', [])