Simplified some vim logic

This commit is contained in:
Strahinja Val Markovic 2012-07-27 21:41:13 -07:00
parent e46ea47df2
commit 70900c5ac6

View File

@ -218,9 +218,7 @@ function! youcompleteme#Complete( findstart, base )
let s:should_use_clang = let s:should_use_clang =
\ pyeval( 'ycm.ShouldUseClang(' . s:completion_start_column . ')' ) \ pyeval( 'ycm.ShouldUseClang(' . s:completion_start_column . ')' )
if ( s:should_use_clang ) if ( !s:should_use_clang )
return s:completion_start_column
else
let l:current_column = col('.') - 1 let l:current_column = col('.') - 1
let l:query_length = current_column - s:completion_start_column let l:query_length = current_column - s:completion_start_column
@ -229,8 +227,8 @@ function! youcompleteme#Complete( findstart, base )
" see :h complete-functions " see :h complete-functions
return -2 return -2
endif endif
return s:completion_start_column
endif endif
return s:completion_start_column
else else
if ( s:should_use_clang ) if ( s:should_use_clang )
return s:ClangCompletion( a:base ) return s:ClangCompletion( a:base )