mirror of
https://github.com/prabirshrestha/asyncomplete.vim.git
synced 2025-12-14 20:35:41 +01:00
Trigger completion when the last commit character is trigger character (#186)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user