Make ⌘S open discard confirmation when there is nothing to merge
This commit is contained in:
@@ -36,7 +36,7 @@ func runGo(_ key: String, _ store: Store, _ overlays: Overlays) {
|
||||
break
|
||||
}
|
||||
Task {
|
||||
if let task = store.findTask(taskId), task.state == .discardSuggested {
|
||||
if let task = store.findTask(taskId), task.status == .active, task.state == .discardSuggested || (task.mergeFacts.unmergedCommits == 0 && task.mergeFacts.unmergedFiles == 0) {
|
||||
await confirmDiscard(task, store, overlays)
|
||||
return
|
||||
}
|
||||
@@ -80,7 +80,7 @@ private let shortcuts: [(String, [(String, String)])] = [
|
||||
("⌘T", "Show every project's active tasks"),
|
||||
("⌘P", "Show the current project's dashboard"),
|
||||
("⌘L", "Open the Lead tab and its composer, closing any view opened over a pane"),
|
||||
("⌘S", "Merge the right pane's task, or discard it when the agent suggests discarding"),
|
||||
("⌘S", "Merge the right pane's task, or discard it when the agent suggests discarding or there is nothing to merge"),
|
||||
("⌘[ ⌘]", "Bring the previous or next server's window forward"),
|
||||
("⌘/", "Show these shortcuts"),
|
||||
("Esc", "Close the switcher, a dialog, or a view opened over a pane"),
|
||||
|
||||
Reference in New Issue
Block a user