fix(editor): incorrect cursor move for the emoji from the line head

pull/11119/head
charlie 2024-03-12 16:51:02 +08:00 committed by Andelf
parent d114756212
commit 451b7a6d9d
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@
([input n]
(when input
(let [{:keys [pos]} (get-caret-pos input)
pos (if (and (= n 1) (not (zero? pos)))
pos (if (= n 1)
(or (util/safe-inc-current-pos-from-start (.-value input) pos)
(inc pos))
(+ pos n))]