Agus Zubiaga
55bb83b24a
workspace: Prompt to save dirty buffers when close would orphan them ( #55889 )
...
The hot-exit shortcut in `save_all_internal` silently serializes dirty
buffers instead of prompting. It assumes the workspace will still be
reachable, but that's not true for `ReplaceWindow`, or for `CloseWindow`
of an empty workspace on macOS — both detach the workspace and orphan
its serialized buffers in the DB with no UI path back to them.
Only allow the shortcut when the workspace is actually recoverable
(`Quit`, `save_last_workspace`, or has visible worktrees). Otherwise
prompt.
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist )
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Closes #55726
Release Notes:
- Fixed unsaved untitled buffers being silently lost when opening a file
or project from an empty window
2026-05-06 15:14:25 +00:00
..
2026-05-06 09:36:43 +00:00
2026-04-24 15:53:14 +00:00
2026-04-16 12:54:17 +00:00
2026-04-27 08:33:40 +00:00
2026-05-06 13:26:09 +00:00
2026-05-06 09:36:43 +00:00
2026-05-05 16:23:03 +00:00
2026-05-06 12:19:33 +00:00
2026-05-05 22:41:13 +00:00
2026-04-27 12:36:11 +00:00
2026-04-23 23:47:30 +00:00
2026-03-24 00:58:09 +01:00
2026-05-05 22:41:13 +00:00
2026-05-01 22:33:54 +00:00
2026-05-05 22:41:13 +00:00
2026-04-23 23:47:30 +00:00
2026-03-13 08:00:22 +00:00
2026-04-16 12:54:17 +00:00
2026-05-05 22:41:13 +00:00
2026-03-30 13:07:13 +00:00
2026-05-01 22:33:54 +00:00
2026-05-05 22:41:13 +00:00
2026-02-25 08:12:04 +01:00
2026-05-04 19:08:24 +00:00
2026-04-10 10:15:28 -04:00
2026-04-28 15:44:17 +00:00
2026-04-02 17:06:57 -03:00
2026-05-05 22:41:13 +00:00
2026-05-05 22:41:13 +00:00
2026-03-27 18:06:56 -07:00
2026-05-05 22:41:13 +00:00
2026-04-15 21:51:15 -03:00
2026-05-06 13:33:06 +00:00
2026-05-05 22:41:13 +00:00
2026-05-05 22:41:13 +00:00
2026-05-05 22:41:13 +00:00
2026-05-04 06:30:47 +00:00
2026-04-02 17:06:57 -03:00
2026-04-21 07:25:22 +00:00
2026-04-27 08:42:45 +00:00
2026-04-29 10:27:47 +00:00
2026-04-24 10:29:51 +00:00
2026-01-14 07:19:13 +00:00
2026-05-05 22:41:13 +00:00
2026-05-05 22:41:13 +00:00
2026-04-27 13:50:00 +00:00
2026-04-29 10:27:47 +00:00
2026-04-23 07:36:36 +00:00
2026-05-05 22:41:13 +00:00
2026-04-30 11:10:14 +00:00
2026-05-06 15:03:49 +00:00
2026-05-04 09:53:36 +00:00
2026-05-05 22:41:13 +00:00
2026-05-04 09:53:36 +00:00
2026-04-10 13:27:04 -04:00
2026-05-05 22:41:13 +00:00
2026-05-06 11:57:36 +00:00
2026-05-06 09:28:05 +00:00
2026-04-01 17:25:32 +00:00
2026-04-07 12:28:19 -03:00
2026-02-28 21:47:30 -05:00
2026-05-06 09:35:43 +00:00
2026-02-19 18:57:49 +01:00
2026-02-28 22:42:19 -05:00
2026-04-21 17:32:54 -04:00
2026-04-29 07:27:05 +00:00
2026-04-21 17:32:54 -04:00
2026-05-05 22:41:13 +00:00
2026-05-05 22:41:13 +00:00
2026-05-05 09:35:08 +00:00
2026-04-18 06:34:19 +00:00
2026-05-04 06:30:47 +00:00
2026-05-05 22:41:13 +00:00
2026-05-04 16:38:14 +00:00
2026-02-19 18:57:49 +01:00
2026-04-03 11:00:13 +00:00
2026-05-06 10:56:20 +00:00
2026-05-05 15:34:56 +00:00
2026-05-05 21:07:52 +00:00
2026-04-30 14:17:32 +00:00
2026-05-06 11:57:36 +00:00
2026-04-01 17:25:32 +00:00
2026-04-27 12:36:11 +00:00
2026-05-06 14:06:48 +00:00
2026-05-06 07:35:40 +00:00
2026-05-06 07:35:40 +00:00
2026-05-04 22:51:56 +00:00
2026-03-24 11:05:12 +00:00
2026-04-24 08:58:26 +00:00
2026-04-14 18:14:31 +02:00
2026-04-23 23:47:30 +00:00
2026-05-04 22:51:56 +00:00
2026-05-06 03:40:02 +00:00
2026-05-06 07:35:40 +00:00
2026-04-24 08:45:47 +00:00
2026-04-07 11:19:21 +05:30
2026-04-29 11:38:03 +00:00
2026-03-28 18:41:33 -04:00
2026-04-22 22:22:10 +00:00
2026-05-05 22:41:13 +00:00
2026-02-12 00:28:17 +00:00
2026-05-05 22:41:13 +00:00
2026-04-29 10:27:47 +00:00
2026-04-24 08:58:26 +00:00
2026-04-29 10:27:47 +00:00
2026-04-18 00:55:44 +02:00
2026-04-02 12:52:42 +00:00
2026-04-27 12:36:11 +00:00
2026-04-27 13:03:33 +00:00
2026-05-06 13:03:00 +00:00
2026-04-24 10:29:51 +00:00
2026-03-25 12:07:34 -06:00
2026-05-05 22:41:13 +00:00
2026-05-05 22:41:13 +00:00
2026-05-04 16:44:18 +00:00
2026-04-01 17:25:32 +00:00
2026-02-03 15:51:40 -05:00
2026-05-01 17:29:27 +00:00
2026-03-06 16:49:55 +00:00
2026-03-17 08:36:37 +01:00
2026-04-24 13:54:28 +00:00
2026-04-27 08:47:27 +00:00
2025-12-30 07:49:01 -03:00
2026-05-04 22:51:56 +00:00
2026-04-23 18:41:52 +00:00
2026-05-06 12:27:58 +00:00
2026-05-06 09:28:05 +00:00
2026-02-17 10:41:10 +00:00
2026-02-20 13:36:04 +00:00
2026-04-14 11:10:31 +00:00
2026-04-24 10:29:51 +00:00
2026-04-15 02:21:56 -04:00
2026-05-05 22:41:13 +00:00
2026-04-27 12:36:11 +00:00
2026-03-27 14:41:25 +01:00
2026-04-07 12:28:19 -03:00
2026-05-05 14:30:17 +00:00
2026-05-05 05:10:46 +00:00
2026-05-05 22:41:13 +00:00
2026-03-13 14:13:12 -03:00
2026-04-21 07:57:35 +02:00
2026-05-06 14:06:48 +00:00
2026-04-08 00:34:54 +00:00
2026-03-31 12:48:22 +03:00
2026-05-06 13:30:07 +00:00
2026-05-05 22:41:13 +00:00
2026-04-30 14:11:47 +00:00
2026-05-05 22:41:13 +00:00
2026-04-24 08:58:26 +00:00
2026-05-05 21:44:06 +00:00
2026-05-06 14:06:48 +00:00
2025-12-15 13:30:13 +00:00
2026-04-15 23:25:44 +00:00
2026-05-05 22:41:13 +00:00
2026-04-16 16:36:09 -07:00
2026-05-05 22:41:13 +00:00
2026-05-05 22:41:13 +00:00
2026-03-09 13:22:12 +01:00
2026-03-21 14:05:30 +01:00
2026-05-04 16:38:14 +00:00
2026-05-05 22:41:13 +00:00
2026-03-07 04:11:45 +00:00
2026-03-27 14:41:25 +01:00
2026-05-05 22:41:13 +00:00
2026-03-18 12:05:57 -07:00
2026-05-04 22:51:56 +00:00
2026-05-06 12:19:29 +00:00
2026-03-25 12:07:34 -06:00
2026-04-02 00:44:53 +00:00
2026-05-05 22:41:13 +00:00
2026-05-05 16:25:56 +00:00
2026-05-05 22:41:13 +00:00
2026-04-29 10:27:47 +00:00
2026-05-05 22:41:13 +00:00
2026-04-24 10:29:51 +00:00
2026-03-21 14:05:30 +01:00
2026-03-29 14:43:05 +00:00
2026-03-31 08:06:37 -06:00
2026-05-04 06:30:47 +00:00
2026-05-05 22:41:13 +00:00
2026-05-05 22:41:13 +00:00
2026-05-05 22:41:13 +00:00
2025-11-07 11:36:05 +00:00
2026-01-28 16:36:44 -08:00
2026-05-05 14:50:57 +00:00
2026-05-05 22:41:13 +00:00
2026-05-06 09:28:05 +00:00
2026-04-23 23:47:30 +00:00
2026-03-27 14:41:25 +01:00
2026-03-27 14:41:25 +01:00
2026-04-23 23:47:30 +00:00
2026-04-23 23:47:30 +00:00
2026-02-28 21:47:30 -05:00
2026-05-05 22:41:13 +00:00
2026-04-01 17:25:32 +00:00
2026-05-05 22:41:13 +00:00
2026-03-13 19:37:18 -03:00
2026-03-27 15:31:49 +00:00
2026-03-27 14:41:25 +01:00
2026-05-06 00:06:51 +00:00
2026-05-06 11:57:36 +00:00
2026-03-19 12:53:26 -04:00
2026-03-09 13:22:12 +01:00
2026-04-07 12:28:19 -03:00
2026-03-27 14:41:25 +01:00
2026-05-01 22:33:54 +00:00
2026-05-06 15:14:25 +00:00
2026-05-06 06:57:06 +00:00
2026-02-19 18:57:49 +01:00
2026-04-22 13:39:48 +00:00
2026-05-06 14:45:32 +00:00
2026-04-21 19:54:02 +00:00
2026-04-02 17:06:57 -03:00
2026-04-02 17:06:57 -03:00
2026-05-05 17:10:03 +00:00
2026-03-03 08:37:58 +00:00
2026-02-11 11:24:04 +00:00