Trigger completion when the last commit character is trigger character (#186)

This commit is contained in:
mattn
2020-02-26 14:38:53 +09:00
committed by GitHub
parent 1f8d8ed26a
commit 5713fa6a1e

View File

@@ -40,6 +40,12 @@ function! s:on_insert_leave() abort
endfunction
function! s:on_text_changed_i() abort
let l:ctx = asyncomplete#context()
let l:startcol = l:ctx['col']
let l:last_char = l:ctx['typed'][l:startcol - 2] " col is 1-indexed, but str 0-indexed
if has_key(b:asyncomplete_triggers, l:last_char)
let s:previous_position = getcurpos()
endif
call s:maybe_notify_on_change()
endfunction