From 70900c5ac653a03e95184deefdd9efda8a551305 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Fri, 27 Jul 2012 21:41:13 -0700 Subject: [PATCH] Simplified some vim logic --- autoload/youcompleteme.vim | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index cd9ff705..f6d36ceb 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -218,9 +218,7 @@ function! youcompleteme#Complete( findstart, base ) let s:should_use_clang = \ pyeval( 'ycm.ShouldUseClang(' . s:completion_start_column . ')' ) - if ( s:should_use_clang ) - return s:completion_start_column - else + if ( !s:should_use_clang ) let l:current_column = col('.') - 1 let l:query_length = current_column - s:completion_start_column @@ -229,8 +227,8 @@ function! youcompleteme#Complete( findstart, base ) " see :h complete-functions return -2 endif - return s:completion_start_column endif + return s:completion_start_column else if ( s:should_use_clang ) return s:ClangCompletion( a:base )