mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-25 06:06:21 +03:00
Merge pull request #505 from nhtzr/fix-ctx-crash
On ocasions, NSTextInputContext comes as null.
This commit is contained in:
commit
254b813a2f
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user