Changed behavior of completion to depend on position passed from editor