From 545d07bcf69495efda0de25fe57ab2a522469e06 Mon Sep 17 00:00:00 2001 From: Prabir Shrestha Date: Wed, 7 Mar 2018 20:12:54 -0800 Subject: [PATCH] Revert "Add base and startcol to ctx (#50)" This reverts commit 6a1a8285a0eadd488821c0ecfae8d7d8bab6f4f6. --- autoload/asyncomplete.vim | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/autoload/asyncomplete.vim b/autoload/asyncomplete.vim index 08ed230..a0ebeb0 100644 --- a/autoload/asyncomplete.vim +++ b/autoload/asyncomplete.vim @@ -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