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:
parent
a1f827a4d8
commit
4e700af5b3
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user