mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-25 06:06:21 +03:00
On ocasions, NSTextInputContext comes as null.
This commit is contained in:
parent
0138899e40
commit
101cf71718
@ -10,8 +10,8 @@ extension NeoVimView {
|
|||||||
override public func keyDown(with event: NSEvent) {
|
override public func keyDown(with event: NSEvent) {
|
||||||
self.keyDownDone = false
|
self.keyDownDone = false
|
||||||
|
|
||||||
let context = NSTextInputContext.current()!
|
let context = NSTextInputContext.current()
|
||||||
let cocoaHandledEvent = context.handleEvent(event)
|
let cocoaHandledEvent = context?.handleEvent(event) ?? false
|
||||||
if self.keyDownDone && cocoaHandledEvent {
|
if self.keyDownDone && cocoaHandledEvent {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user