mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
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:
@@ -10,7 +10,8 @@ let s:dummy_sign_id = s:first_sign_id - 1
|
|||||||
|
|
||||||
" Removes gitgutter's signs from the given file.
|
" Removes gitgutter's signs from the given file.
|
||||||
function! sign#clear_signs(file_name)
|
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
|
exe ":sign unplace" sign[1] "file=" . a:file_name
|
||||||
endfor
|
endfor
|
||||||
call setbufvar(a:file_name, 'gitgutter_gitgutter_signs', [])
|
call setbufvar(a:file_name, 'gitgutter_gitgutter_signs', [])
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ function! utility#has_unsaved_changes(file)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! utility#has_fresh_changes(file)
|
function! utility#has_fresh_changes(file)
|
||||||
return getbufvar(a:file, 'changedtick') != getbufvar(a:file, 'gitgutter_last_tick', -1)
|
return getbufvar(a:file, 'changedtick') != getbufvar(a:file, 'gitgutter_last_tick')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! utility#save_last_seen_change(file)
|
function! utility#save_last_seen_change(file)
|
||||||
|
|||||||
Reference in New Issue
Block a user