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

cover the MainWindow+Delegates.swift case

This commit is contained in:
Neal Clark 2017-10-06 09:34:01 -07:00
parent a1f827a4d8
commit 4e700af5b3

View File

@ -140,9 +140,11 @@ extension MainWindow {
let alert = NSAlert()
alert.addButton(withTitle: "Cancel")
alert.addButton(withTitle: "Discard and Close")
let discardAndCloseButton = alert.addButton(withTitle: "Discard and Close")
alert.messageText = "The current buffer has unsaved changes!"
alert.alertStyle = .warning
discardAndCloseButton.keyEquivalentModifierMask = .command
discardAndCloseButton.keyEquivalent = "d"
alert.beginSheetModal(for: self.window, completionHandler: { response in
if response == NSAlertSecondButtonReturn {
self.neoVimView.closeCurrentTabWithoutSaving()