mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
This PR reverts #10740, as it makes it too easy to close Zed
accidentally.
Quitting Zed when you don't mean to is disruptive and can break your
flow. This is even more the case when you're collaborating.
Therefore, we shouldn't make it easy to quit Zed when you don't mean to.
If we want to bring back this behavior it needs to have a corresponding
setting that should, in my opinion, be **off** by default. Additionally,
someone made the good point that this behavior should not be present on
Linux or Windows.
This reverts commit 5102e37a5b
.
Release Notes:
- Changed `cmd-w` with no open tabs to no longer close the window
(preview-only).
This commit is contained in:
parent
7ec963664e
commit
0de2636324
@ -5,7 +5,7 @@ use crate::{
|
||||
},
|
||||
toolbar::Toolbar,
|
||||
workspace_settings::{AutosaveSetting, TabBarSettings, WorkspaceSettings},
|
||||
CloseWindow, NewCenterTerminal, NewFile, NewSearch, OpenInTerminal, OpenTerminal, OpenVisible,
|
||||
NewCenterTerminal, NewFile, NewSearch, OpenInTerminal, OpenTerminal, OpenVisible,
|
||||
SplitDirection, ToggleZoom, Workspace,
|
||||
};
|
||||
use anyhow::Result;
|
||||
@ -879,8 +879,6 @@ impl Pane {
|
||||
cx: &mut ViewContext<Self>,
|
||||
) -> Option<Task<Result<()>>> {
|
||||
if self.items.is_empty() {
|
||||
// Close the window when there's no active items to close.
|
||||
cx.dispatch_action(Box::new(CloseWindow));
|
||||
return None;
|
||||
}
|
||||
let active_item_id = self.items[self.active_item_index].item_id();
|
||||
|
Loading…
Reference in New Issue
Block a user