WIP: autocomplete cursor movement and insertion