1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-29 03:53:38 +03:00

On ocasions, NSTextInputContext comes as null.

This commit is contained in:
Ezequiel Rosas 2017-08-07 15:55:32 -05:00
parent 0138899e40
commit 101cf71718

View File

@ -10,8 +10,8 @@ extension NeoVimView {
override public func keyDown(with event: NSEvent) {
self.keyDownDone = false
let context = NSTextInputContext.current()!
let cocoaHandledEvent = context.handleEvent(event)
let context = NSTextInputContext.current()
let cocoaHandledEvent = context?.handleEvent(event) ?? false
if self.keyDownDone && cocoaHandledEvent {
return
}