Fixes a typo.

This commit is contained in:
zonble 2022-02-03 01:10:51 +08:00
parent d4173bd931
commit ff9664c7f1
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ class InputState: NSObject {
@objc var userPhrase: String {
let text = (composingBuffer as NSString).substring(with: markedRange)
let (exactBegin, _) = (composingBuffer as NSString).characterIndex(from: markedRange.location)
let (exactEnd, _) = (composingBuffer as NSString).characterIndex(from: markedRange.location)
let (exactEnd, _) = (composingBuffer as NSString).characterIndex(from: markedRange.location + markedRange.length)
let readings = readings[exactBegin..<exactEnd]
let joined = readings.joined(separator: "-")
return "\(text) \(joined)"