Fix cursor position for more complex prompt types