Ignore selections persistence for multi buffer editors (#25140)

Follow-up of https://github.com/zed-industries/zed/pull/25083

Release Notes:

- N/A
This commit is contained in:
Kirill Bulatov 2025-02-19 08:42:22 +02:00 committed by GitHub
parent 13da468e22
commit e57b9e5f83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2203,6 +2203,7 @@ impl Editor {
cx.emit(SearchEvent::ActiveMatchChanged)
}
if local
&& self.is_singleton(cx)
&& WorkspaceSettings::get(None, cx).restore_on_startup != RestoreOnStartupBehavior::None
{
if let Some(workspace_id) = self.workspace.as_ref().and_then(|workspace| workspace.1) {
@ -15063,7 +15064,9 @@ impl Editor {
window: &mut Window,
cx: &mut Context<Editor>,
) {
if WorkspaceSettings::get(None, cx).restore_on_startup == RestoreOnStartupBehavior::None {
if !self.is_singleton(cx)
|| WorkspaceSettings::get(None, cx).restore_on_startup == RestoreOnStartupBehavior::None
{
return;
}
let Some(selections) = DB.get_editor_selections(item_id, workspace_id).log_err() else {