diff --git a/autoload/sy.vim b/autoload/sy.vim index d4468e5..c3e1962 100644 --- a/autoload/sy.vim +++ b/autoload/sy.vim @@ -96,8 +96,7 @@ endfunction " Function: #stop {{{1 function! sy#stop(bnum) abort - let bvars = getbufvar(a:bnum, '', {}) - if !has_key(bvars, 'sy') + if !exists('b:sy') return endif diff --git a/autoload/sy/debug.vim b/autoload/sy/debug.vim index f41683e..6128000 100644 --- a/autoload/sy/debug.vim +++ b/autoload/sy/debug.vim @@ -5,7 +5,7 @@ scriptencoding utf-8 " Function: #list_active_buffers {{{1 function! sy#debug#list_active_buffers() abort for b in range(0, bufnr('$')) - if !buflisted(b) || empty(getbufvar(b, 'sy', {})) + if !buflisted(b) || empty(getbufvar(b, 'sy')) continue endif diff --git a/autoload/sy/sign.vim b/autoload/sy/sign.vim index b45c6e0..0815c64 100644 --- a/autoload/sy/sign.vim +++ b/autoload/sy/sign.vim @@ -42,17 +42,16 @@ endfunction " Function: #remove_all {{{1 function! sy#sign#remove_all(bnum) abort - let sy = getbufvar(a:bnum, 'sy') if g:signify_sign_overwrite - execute 'sign unplace * buffer='. sy.buffer + execute 'sign unplace * buffer='. b:sy.buffer else - for hunk in sy.hunks + for hunk in b:sy.hunks for id in hunk.ids execute 'sign unplace' id endfor endfor endif - let sy.hunks = [] - let sy.stats = [0, 0, 0] + let b:sy.hunks = [] + let b:sy.stats = [0, 0, 0] endfunction