fix cursor position if the autocompleted function has no parameters