Skip to content

Instantly share code, notes, and snippets.

@basyura
Created April 27, 2012 13:13
Show Gist options
  • Save basyura/2509074 to your computer and use it in GitHub Desktop.
Save basyura/2509074 to your computer and use it in GitHub Desktop.
jscomplete
diff --git a/autoload/neocomplcache/sources/jscomplete.vim b/autoload/neocomplca
index 8388ec9..70f8b8a 100644
--- a/autoload/neocomplcache/sources/jscomplete.vim
+++ b/autoload/neocomplcache/sources/jscomplete.vim
@@ -22,6 +22,16 @@ function s:source.get_keyword_pos (cur_text) "{{{
return jscomplete#GetCompletePosition(a:cur_text, line('.'))
endfunction "}}}
function s:source.get_complete_words (pos, complWord) "{{{
+
+ let completion_length = neocomplcache#get_completion_length('jscomplete')
+ if completion_length == 0
+ let completion_length = g:neocomplcache_auto_completion_start_length
+ endif
+
+ if len(a:complWord) < completion_length
+ return []
+ endif
+
let l:currentLine = line('.')
let l:currentCol = col('.')
let l:target = {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment