fix #116

merge setPosition code from https://github.com/atom/autocomplete