Don't save deleted files (#24171)
We now treat new files that have no content as not-dirty. This fixes the git diff view when deleted files are present. It also fixes a long-standing bug where `zed RAEDME` and then closing the tab would prompt for "unsaved changes" when there were none. Release Notes: - Fixed a bug where closing an empty, named, file would warn about unsaved content.
This commit is contained in:
parent
66e0898425
commit
9a22ef2fd5
2 changed files with 13 additions and 8 deletions
|
@ -27,7 +27,7 @@ use workspace::{
|
|||
|
||||
use crate::git_panel::GitPanel;
|
||||
|
||||
actions!(git, [ShowUncommittedChanges]);
|
||||
actions!(git, [Diff]);
|
||||
|
||||
pub(crate) struct ProjectDiff {
|
||||
multibuffer: Entity<MultiBuffer>,
|
||||
|
@ -63,7 +63,7 @@ impl ProjectDiff {
|
|||
|
||||
fn deploy(
|
||||
workspace: &mut Workspace,
|
||||
_: &ShowUncommittedChanges,
|
||||
_: &Diff,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Workspace>,
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue