mirror of
https://github.com/prabirshrestha/asyncomplete.vim.git
synced 2026-06-12 15:37:02 +02:00
Revert "Add base and startcol to ctx (#50)"
This reverts commit 6a1a8285a0.
This commit is contained in:
@@ -236,20 +236,8 @@ function! s:notify_sources_to_refresh(ctx, force) abort
|
||||
endif
|
||||
if l:refresh
|
||||
try
|
||||
let l:ctx = copy(a:ctx)
|
||||
let l:typed = l:ctx['typed']
|
||||
if !exits('l:matchpos')
|
||||
let l:matchpos = s:get_matchpos(s:sources[l:source_name], a:ctx)
|
||||
let l:startpos = l:matchpos[1]
|
||||
let l:endpos = l:matchpos[2]
|
||||
let l:typed_len = l:endpos - l:startpos
|
||||
endif
|
||||
let l:startcol = len(l:typed[:len(l:typed) - l:typed_len -1])
|
||||
let l:base = l:ctx['typed'][l:startcol-1:]
|
||||
let l:ctx['startcol'] = l:startcol
|
||||
let l:ctx['base'] = l:base
|
||||
call asyncomplete#log('core.s:notify_sources_to_refresh', 'completor()', l:source_name, l:ctx)
|
||||
call s:sources[l:source_name].completor(s:sources[l:source_name], l:ctx)
|
||||
call asyncomplete#log('core.s:notify_sources_to_refresh', 'completor()', l:source_name, a:ctx)
|
||||
call s:sources[l:source_name].completor(s:sources[l:source_name], a:ctx)
|
||||
catch
|
||||
call asyncomplete#log('core.s:notify_sources_to_refresh', 'completor()', 'error', v:exception)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user