Skip to content

Commit

Permalink
bufexists() function expects a number as a parameter. (#940)
Browse files Browse the repository at this point in the history
Since bufnr is used as a key to various dicts like s:sign_queue,
s:placed_signs, etc. its value is converted to string. So we have to
explicitly convert it back to number when calling bufexists() function.
  • Loading branch information
datanoise authored and blueyed committed Jan 18, 2017
1 parent ab2bfdc commit dc27a33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/neomake/signs.vim
Expand Up @@ -111,7 +111,7 @@ function! neomake#signs#CleanOldSigns(bufnr, type) abort
return
endif
call neomake#utils#DebugObject('Cleaning old signs in buffer '.a:bufnr.': ', s:last_placed_signs[a:type])
if bufexists(a:bufnr)
if bufexists(str2nr(a:bufnr))
for ln in keys(s:last_placed_signs[a:type][a:bufnr])
let cmd = 'sign unplace '.s:last_placed_signs[a:type][a:bufnr][ln].' buffer='.a:bufnr
call neomake#utils#DebugMessage('Unplacing sign: '.cmd)
Expand Down

0 comments on commit dc27a33

Please sign in to comment.