Skip to content

Commit 98c693f

Browse files
authored
Merge pull request #353 from kassio/master
Fix error when "hunk" does not exist in sy
2 parents 697ae15 + 226cd1c commit 98c693f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autoload/sy/sign.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ endfunction
159159

160160
" #remove_all_signs {{{1
161161
function! sy#sign#remove_all_signs(bufnr) abort
162-
let sy = getbufvar(a:bufnr, 'sy')
162+
let sy = getbufvar(a:bufnr, 'sy', {})
163163

164-
for hunk in sy.hunks
165-
for id in hunk.ids
164+
for hunk in get(sy, 'hunks', [])
165+
for id in get(hunk, 'ids', [])
166166
execute 'sign unplace' id 'buffer='.a:bufnr
167167
endfor
168168
endfor

0 commit comments

Comments
 (0)