update autocomplete on cursor changes