Use custom functions for plugin buffer-local variables.

This commit is contained in:
Andy Stewart
2017-02-22 10:36:59 +00:00
parent 562e6043d3
commit 1bbf892eba
5 changed files with 42 additions and 30 deletions

View File

@@ -56,7 +56,7 @@ function! gitgutter#diff#run_diff(realtime, preserve_full_diff) abort
let cmd = '('
let bufnr = gitgutter#utility#bufnr()
let tracked = getbufvar(bufnr, 'gitgutter_tracked') " i.e. tracked by git
let tracked = gitgutter#utility#getbufvar(bufnr, 'gitgutter_tracked', 0) " i.e. tracked by git
if !tracked
" Don't bother trying to realtime-diff an untracked file.
" NOTE: perhaps we should pull this guard up to the caller?