Fix wrong location of cursor when use "?"