Use cursor position to determine prefix.