aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/mouse.rs
diff options
context:
space:
mode:
authorEric Yue <jiacheng.yue@foxmail.com>2026-09-21 01:33:11 +0800
committerGitHub <noreply@github.com>2026-09-20 19:33:11 +0200
commitf090ce95d05d2e7811869be93f9a23bf4ac2c3af (patch)
treed5a1a447fd6043056e5ea3cb1a9bd0419957e57b /src/client/shell/mouse.rs
parentf10df75c8a5f1b5e5f90689c3a8ceb6758366e05 (diff)
fix: confirm closing the last tab in the tui (#4409)
* fix: confirm closing the last tab in the tui refs #4379 * docs: clarify last-tab worktree confirmation in translations refs #4379 --------- Co-authored-by: JJ Liebig <jonathan.liebig@gmail.com>
Diffstat (limited to 'src/client/shell/mouse.rs')
-rw-r--r--src/client/shell/mouse.rs15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/client/shell/mouse.rs b/src/client/shell/mouse.rs
index a7e0dd81..f2df2941 100644
--- a/src/client/shell/mouse.rs
+++ b/src/client/shell/mouse.rs
@@ -1692,20 +1692,7 @@ impl ClientShellState {
match self.overlay.as_ref() {
Some(ClientShellOverlay::Rename(_)) => self.save_rename_overlay(outcome),
Some(ClientShellOverlay::ConfirmClose(_)) => {
- let Some(ClientShellOverlay::ConfirmClose(confirm)) = self.overlay.take()
- else {
- return;
- };
- self.push_endpoint_method(
- crate::api::schema::Method::WorkspaceClose(
- crate::api::schema::WorkspaceCloseParams {
- workspace_id: confirm.workspace_id,
- close_group: true,
- },
- ),
- outcome,
- );
- outcome.repaint = true;
+ self.accept_close_confirmation(outcome);
}
_ => {}
}