Skip to content

Commit

Permalink
Fix Optional in Test (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyeahen authored and youknowone committed Sep 13, 2018
1 parent 44585ba commit 9bc95c3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion iOSShared/InputViewController.swift
Expand Up @@ -345,8 +345,14 @@ class InputViewController: BasicInputViewController {


if processed == 0 { if processed == 0 {
self.inputMethodView.resetContext() self.inputMethodView.resetContext()
proxy.insertText("\(UnicodeScalar(keycode))")
if let code = UnicodeScalar(keycode) {
proxy.insertText("\(code)")
} else {
print("Optional clear fail!")
}
//self.log("truncate and insert: \(UnicodeScalar(keycode))") //self.log("truncate and insert: \(UnicodeScalar(keycode))")

} else { } else {
let commited = context_get_commited_unicodes(context: context!) let commited = context_get_commited_unicodes(context: context!)
let composed = context_get_composed_unicodes(context: context!) let composed = context_get_composed_unicodes(context: context!)
Expand Down

0 comments on commit 9bc95c3

Please sign in to comment.