position completion popup above cursor when necessary