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