From fba6ff5d33d7df838080e2855624898564e20cf9 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Wed, 29 Jun 2022 13:20:23 +0800 Subject: [PATCH] KeyHandler // Misc fix in FixNode(). --- Source/Modules/ControllerModules/KeyHandler_Core.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Modules/ControllerModules/KeyHandler_Core.swift b/Source/Modules/ControllerModules/KeyHandler_Core.swift index bf858980..66b1cedc 100644 --- a/Source/Modules/ControllerModules/KeyHandler_Core.swift +++ b/Source/Modules/ControllerModules/KeyHandler_Core.swift @@ -205,9 +205,9 @@ class KeyHandler { /// 若偏好設定內啟用了相關選項,則會在選字之後始終將游標推送至選字厚的節錨的前方。 if mgrPrefs.moveCursorAfterSelectingCandidate, respectCursorPushing { var nextPosition = 0 - for node in walkedAnchors { + for theAnchor in walkedAnchors { if nextPosition >= cursorIndex { break } - nextPosition += node.spanningLength + nextPosition += theAnchor.spanningLength } if nextPosition <= compositorLength { compositorCursorIndex = nextPosition