InputHandler // Patch generateStateOfInputting() to fix markers.
This commit is contained in:
parent
86c407a16d
commit
3c8fe42f9f
|
@ -30,6 +30,7 @@ extension InputHandler {
|
|||
var cursor = cpInput
|
||||
? displayTextSegments.joined().count
|
||||
: convertCursorForDisplay(compositor.cursor)
|
||||
let cursorSansReading = cursor
|
||||
let reading: String = (sansReading || isCodePointInputMode) ? "" : readingForDisplay // 先提出來,減輕運算負擔。
|
||||
if !reading.isEmpty {
|
||||
var newDisplayTextSegments = [String]()
|
||||
|
@ -66,7 +67,7 @@ extension InputHandler {
|
|||
displayTextSegments: displayTextSegments,
|
||||
cursor: cursor, highlightAt: segHighlightedAt
|
||||
)
|
||||
result.marker = compositor.cursor
|
||||
result.marker = cursorSansReading
|
||||
return result
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue