InputHandler // Simplifying inline rotation method.
This commit is contained in:
parent
2cf53d5c6a
commit
4860b52306
|
@ -708,28 +708,15 @@ extension InputHandler {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for candidate in candidates {
|
for candidate in candidates {
|
||||||
if candidate == currentPaired {
|
currentIndex =
|
||||||
if reverseOrder {
|
(candidate == currentPaired && reverseOrder)
|
||||||
if currentIndex == 0 {
|
? ((currentIndex == 0) ? candidates.count - 1 : currentIndex - 1) : currentIndex + 1
|
||||||
currentIndex = candidates.count - 1
|
if candidate == currentPaired { break }
|
||||||
} else {
|
|
||||||
currentIndex -= 1
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
currentIndex += 1
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
|
||||||
currentIndex += 1
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if currentIndex >= candidates.count {
|
if currentIndex >= candidates.count { currentIndex = 0 }
|
||||||
currentIndex = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
consolidateNode(candidate: candidates[currentIndex], respectCursorPushing: false, preConsolidate: false)
|
consolidateNode(candidate: candidates[currentIndex], respectCursorPushing: false, preConsolidate: false)
|
||||||
|
|
||||||
delegate.switchState(generateStateOfInputting())
|
delegate.switchState(generateStateOfInputting())
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue