Don't run when there's no filetype set.
Implements the smaller part of issue #178.
This commit is contained in:
parent
c46b9c6b31
commit
81444e207c
@ -136,9 +136,12 @@ endfunction
|
|||||||
|
|
||||||
|
|
||||||
function! s:AllowedToCompleteInCurrentFile()
|
function! s:AllowedToCompleteInCurrentFile()
|
||||||
|
let current_filetype = &filetype
|
||||||
|
if !current_filetype
|
||||||
|
return 0
|
||||||
" If the user set the current filetype as a filetype that YCM should ignore,
|
" If the user set the current filetype as a filetype that YCM should ignore,
|
||||||
" then we don't do anything
|
" then we don't do anything
|
||||||
return !get( g:ycm_filetypes_to_completely_ignore, &filetype, 0 )
|
return !get( g:ycm_filetypes_to_completely_ignore, current_filetype, 0 )
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user