ZIm/crates/workspace/src
Kirill Bulatov e11e7df724
Restore editor state on reopen (#27672)
Closes https://github.com/zed-industries/zed/issues/11626
Part of https://github.com/zed-industries/zed/issues/12853

`"restore_on_file_reopen": true` in workspace settings can now be used
to enable and disable editor data between file reopens in the same pane:


https://github.com/user-attachments/assets/8d938ee1-d854-42a8-bbc3-2a4e4d7d5933

The settings are generic and panes' data store can be extended for
further entities, beyond editors.

---------------
Impl details: 

Currently, the project entry IDs seem to be stable across file reopens,
unlike BufferIds, so those were used.
Originally, the DB data was considered over in-memory one as editors
serialize their state anyway, but managing and exposing PaneIds out of
the DB is quite tedious and joining the DB data otherwise is not
possible.


Release Notes:

- Started to restore editor state on reopen
2025-03-28 22:04:16 +00:00
..
persistence Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
dock.rs Prevent toggle_dock from opening assistant panel when it is disabled via settings (#27215) 2025-03-27 19:19:37 +00:00
item.rs Restore editor state on reopen (#27672) 2025-03-28 22:04:16 +00:00
modal_layer.rs Fix the feedback modal (#26793) 2025-03-14 17:55:52 -04:00
notifications.rs Move "async move" a few characters to the left in cx.spawn() (#26758) 2025-03-19 02:09:02 +00:00
pane.rs Restore editor state on reopen (#27672) 2025-03-28 22:04:16 +00:00
pane_group.rs Hide the mouse when the user is typing in the editor - take 2 (#27519) 2025-03-27 01:58:26 +05:30
persistence.rs Allow enabling/disabling breakpoints (#27280) 2025-03-26 02:06:08 -04:00
searchable.rs Move "async move" a few characters to the left in cx.spawn() (#26758) 2025-03-19 02:09:02 +00:00
shared_screen.rs Switch fully to Rust Livekit (redux) (#27126) 2025-03-28 17:58:23 +00:00
status_bar.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
tasks.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
theme_preview.rs Revert "ui: Color cleanup (#26673)" (#26681) 2025-03-13 15:40:57 +00:00
toast_layer.rs Move "async move" a few characters to the left in cx.spawn() (#26758) 2025-03-19 02:09:02 +00:00
toolbar.rs Allow buffer search in project search (#23819) 2025-01-31 00:13:46 -07:00
workspace.rs Restore editor state on reopen (#27672) 2025-03-28 22:04:16 +00:00
workspace_settings.rs Restore editor state on reopen (#27672) 2025-03-28 22:04:16 +00:00