fixed bug when triggering autocomplete whith trailing characters in line
merge