added type check for g:ycm_filetype_blacklist
This commit is contained in:
parent
c3b4884cd3
commit
0868aef516
@ -403,9 +403,11 @@ function! s:AllowedToCompleteInBuffer( buffer )
|
|||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let whitelist_allows = has_key( g:ycm_filetype_whitelist, '*' ) ||
|
let whitelist_allows = type( g:ycm_filetype_whitelist ) != type( {} ) ||
|
||||||
|
\ has_key( g:ycm_filetype_whitelist, '*' ) ||
|
||||||
\ has_key( g:ycm_filetype_whitelist, buffer_filetype )
|
\ has_key( g:ycm_filetype_whitelist, buffer_filetype )
|
||||||
let blacklist_allows = !has_key( g:ycm_filetype_blacklist, buffer_filetype )
|
let blacklist_allows = type( g:ycm_filetype_blacklist ) != type( {} ) ||
|
||||||
|
\ !has_key( g:ycm_filetype_blacklist, buffer_filetype )
|
||||||
|
|
||||||
let allowed = whitelist_allows && blacklist_allows
|
let allowed = whitelist_allows && blacklist_allows
|
||||||
if allowed
|
if allowed
|
||||||
|
Loading…
Reference in New Issue
Block a user