mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-25 23:02:35 +03:00
Implement init from coder for application just to be safe
This commit is contained in:
parent
fcefde94d1
commit
e3b9b361c7
@ -8,19 +8,21 @@ import Cocoa
|
||||
class Application: NSApplication {
|
||||
|
||||
override init() {
|
||||
// Do very early initializtion here
|
||||
|
||||
// disable default press and hold behavior (copied from MacVim)
|
||||
CFPreferencesSetAppValue(
|
||||
"ApplePressAndHoldEnabled" as NSString,
|
||||
"NO" as NSString,
|
||||
kCFPreferencesCurrentApplication
|
||||
)
|
||||
|
||||
setPressAndHoldSetting()
|
||||
super.init()
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
setPressAndHoldSetting()
|
||||
super.init(coder: coder)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate func setPressAndHoldSetting() {
|
||||
// disable default press and hold behavior (copied from MacVim)
|
||||
CFPreferencesSetAppValue(
|
||||
"ApplePressAndHoldEnabled" as NSString,
|
||||
"NO" as NSString,
|
||||
kCFPreferencesCurrentApplication
|
||||
)
|
||||
}
|
@ -12,23 +12,25 @@ let logger = FileLogger(as: "VimR",
|
||||
class Application: NSApplication {
|
||||
|
||||
override init() {
|
||||
// Do very early initializtion here
|
||||
|
||||
// disable default press and hold behavior (copied from MacVim)
|
||||
CFPreferencesSetAppValue(
|
||||
"ApplePressAndHoldEnabled" as NSString,
|
||||
"NO" as NSString,
|
||||
kCFPreferencesCurrentApplication
|
||||
)
|
||||
|
||||
setPressAndHoldSetting()
|
||||
super.init()
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
setPressAndHoldSetting()
|
||||
super.init(coder: coder)
|
||||
}
|
||||
|
||||
@IBAction override func showHelp(_: Any?) {
|
||||
NSWorkspace.shared().open(URL(string: "https://github.com/qvacua/vimr/wiki")!)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate func setPressAndHoldSetting() {
|
||||
// disable default press and hold behavior (copied from MacVim)
|
||||
CFPreferencesSetAppValue(
|
||||
"ApplePressAndHoldEnabled" as NSString,
|
||||
"NO" as NSString,
|
||||
kCFPreferencesCurrentApplication
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user