Skip to content

Commit

Permalink
bugfix for #262
Browse files Browse the repository at this point in the history
  • Loading branch information
jayli committed Dec 5, 2023
1 parent c27bf2f commit 3b022dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
10 changes: 0 additions & 10 deletions autoload/easycomplete/sources/tn.vim
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ let s:version = ''
let s:force_complete = 0

function! easycomplete#sources#tn#constructor(opt, ctx)
" call s:console('.')
let s:opt = a:opt
let name = get(a:opt, "name", "")
let s:name = name
Expand Down Expand Up @@ -272,15 +271,6 @@ function! s:TabnineJobCallback(job_id, data, event)
let result_items = s:NormalizeCompleteResult(a:data)
call s:CompleteHandler(result_items)
endif

" if t9_cmp_kind == 'snippet'
" call s:SuggestHandler(res_array)
" elseif t9_cmp_kind == "nothing"
" call s:CompleteHandler([])
" else
" let result_items = s:NormalizeCompleteResult(a:data)
" call s:CompleteHandler(result_items)
" endif
endfunction

function! s:SuggestHandler(res_array)
Expand Down
10 changes: 4 additions & 6 deletions autoload/easycomplete/tabnine.vim
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ function easycomplete#tabnine#ready()
return v:true
endfunction

" function! easycomplete#tabnine#init()
" if !easycomplete#tabnine#ready()
" return
" endif
" endfunction

function! easycomplete#tabnine#fire()
if pumvisible()
return
Expand All @@ -39,6 +33,10 @@ function! easycomplete#tabnine#fire()
if !s:is_last_char()
return
endif
" 不是魔术指令
if getline('.')[0:col('.')] =~ "\\s\\{-}TabNine::\\(config\\|sem\\)$"
return
endif

call s:flush()
call easycomplete#tabnine#SuggestFlagSet()
Expand Down

0 comments on commit 3b022dd

Please sign in to comment.