linux: Save opened workspace when closing last window (#15754)
Fixes https://github.com/zed-industries/zed/issues/15642 (also fixes a bug where replacing a workspace in the same window would reopen the old project after closing with `CTRL + Q`) Release Notes: - Linux: Fixed last workspace not being restored on startup ([#15642](https://github.com/zed-industries/zed/issues/15642)). - Fixed a bug where a closed workspace could be reopened on startup.
This commit is contained in:
parent
0ec29d6866
commit
559ce87b4e
4 changed files with 36 additions and 14 deletions
|
@ -35,6 +35,7 @@ use std::{borrow::Cow, ops::Deref, path::Path, sync::Arc};
|
|||
use task::static_source::{StaticSource, TrackedFile};
|
||||
use theme::ActiveTheme;
|
||||
use workspace::notifications::NotificationId;
|
||||
use workspace::CloseIntent;
|
||||
|
||||
use paths::{local_settings_file_relative_path, local_tasks_file_relative_path};
|
||||
use terminal_view::terminal_panel::{self, TerminalPanel};
|
||||
|
@ -621,7 +622,7 @@ fn quit(_: &Quit, cx: &mut AppContext) {
|
|||
for window in workspace_windows {
|
||||
if let Some(should_close) = window
|
||||
.update(&mut cx, |workspace, cx| {
|
||||
workspace.prepare_to_close(true, cx)
|
||||
workspace.prepare_to_close(CloseIntent::Quit, cx)
|
||||
})
|
||||
.log_err()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue