Permalink
Browse files

Fix Optional in Test (#308)

  • Loading branch information...
kyeahen authored and youknowone committed Sep 13, 2018
1 parent 44585ba commit 9bc95c342fe27e6342639023591a30ae3f2d2b98
Showing with 7 additions and 1 deletion.
  1. +7 −1 iOSShared/InputViewController.swift
@@ -345,8 +345,14 @@ class InputViewController: BasicInputViewController {
if processed == 0 {
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))")
} else {
let commited = context_get_commited_unicodes(context: context!)
let composed = context_get_composed_unicodes(context: context!)

0 comments on commit 9bc95c3

Please sign in to comment.