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
|
break
|
||||||
}
|
}
|
||||||
Task {
|
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)
|
await confirmDiscard(task, store, overlays)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -80,7 +80,7 @@ private let shortcuts: [(String, [(String, String)])] = [
|
|||||||
("⌘T", "Show every project's active tasks"),
|
("⌘T", "Show every project's active tasks"),
|
||||||
("⌘P", "Show the current project's dashboard"),
|
("⌘P", "Show the current project's dashboard"),
|
||||||
("⌘L", "Open the Lead tab and its composer, closing any view opened over a pane"),
|
("⌘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"),
|
("⌘[ ⌘]", "Bring the previous or next server's window forward"),
|
||||||
("⌘/", "Show these shortcuts"),
|
("⌘/", "Show these shortcuts"),
|
||||||
("Esc", "Close the switcher, a dialog, or a view opened over a pane"),
|
("Esc", "Close the switcher, a dialog, or a view opened over a pane"),
|
||||||
|
|||||||
Reference in New Issue
Block a user