Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zed does not prompt before deleting files containing usaved changes #9905

Open
1 task done
hmemcpy opened this issue Mar 28, 2024 · 3 comments · May be fixed by #20172
Open
1 task done

Zed does not prompt before deleting files containing usaved changes #9905

hmemcpy opened this issue Mar 28, 2024 · 3 comments · May be fixed by #20172
Labels
bug [core label] editor Feedback for code editing, formatting, editor iterations, etc project panel Feedback for files tree view regression A bug that was introduced in a recent release

Comments

@hmemcpy
Copy link
Contributor

hmemcpy commented Mar 28, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

If a buffer contains unsaved changes, deleting the file (or its containing folder) from the project panel does not prompt about the unsaved changes and deletes the file on confirmation.

2024-03-28 11 34 30
(the delete popup isn't visible in the gif above for some reason)

If a buffer contains unsaved changes, Zed should warn about deleting such files.
Equivalent VSCode prompt:
image

Environment

Zed: v0.128.3 (Zed)
OS: macOS 14.4.1
Memory: 32 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

@hmemcpy hmemcpy added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Mar 28, 2024
@JosephTLyons JosephTLyons added regression A bug that was introduced in a recent release editor Feedback for code editing, formatting, editor iterations, etc project panel Feedback for files tree view and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Mar 29, 2024
@JosephTLyons
Copy link
Collaborator

Thanks for the report @hmemcpy, I think this used to prompt - so this feels like a regression.

@hmemcpy
Copy link
Contributor Author

hmemcpy commented Mar 29, 2024

Thanks, but I now think I need to rephrase this. It does prompt to delete the file, it wasn't visible in the gif. But if the file contains unsaved changes - it should warn that the file deleted contains unsaved changes.

I noticed this weird behavior when I deleted a folder containing a "dirty" file. The folder and the file were removed from the project panel, but the tab remained opened in the editor. Upon pressing Save, the folder and the file reappeared in the project panel.

I think this was fixed, so that a deleted file also closes the tab, but I still think it should warn before deleting files containing unsaved changes.

So perhaps this is more of a feature request rather than a bug.

@dbakong
Copy link

dbakong commented Aug 12, 2024

I also experienced this issue, while using zed v0.146.5 on mac.
Zed doesn't seem to prompt for sending to trash(⌘⌫). Zed only seems to prompt when permanently deleting the file (⌘⌥⌫).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] editor Feedback for code editing, formatting, editor iterations, etc project panel Feedback for files tree view regression A bug that was introduced in a recent release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants