Skip to content

Commit

Permalink
fix test clang diags driver bufnr
Browse files Browse the repository at this point in the history
although it is impossible that exist diags bufnr but not exist
diags driver bufnr, anyway, a defensive test
  • Loading branch information
justmao945 committed Mar 17, 2015
1 parent 6da93f9 commit eca2c3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/clang.vim
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ func! s:DiagnosticsWindowClose(when_bufwinleave)
endif

" is not leave from the driver buffer window
if a:when_bufwinleave && l:cbn != t:clang_diags_driver_bufnr
if a:when_bufwinleave && (!exists('t:clang_diags_driver_bufnr') || l:cbn != t:clang_diags_driver_bufnr)
return
end

Expand Down

0 comments on commit eca2c3b

Please sign in to comment.