🐞 Source editor disappears when deleting all text
Description
Deleting all text from the source editor results in the source editor being replaced by a QuickLook view.
To Reproduce
- Open a project
- Open a file in the project
- Delete all of the text in the file
- Notice the source editor is replaced by a big file icon (QuickLook view)
Expected Behavior
The source editor should remain in place.
Screenshots
https://github.com/CodeEditApp/CodeEdit/assets/806104/2d0bb1b3-d69a-43f8-866c-111bf3136b5a
Related issues
- #1698
- #1707
@plbstl I believe this was introduced in your recent PR #1707. Would you be able to take a look at this one?
I see. I'm taking a look at it now
Whoops, didn't see @plbstl was taking a look. I've got a PR open for this now it was a very small fix.
Oh okay. I'll also test it out
I found some issues with #1723.
Doesn't work for:
- files without file extensions
- files with only file extensions
Also, it opens some binaries as text files.
https://github.com/CodeEditApp/CodeEdit/assets/49006567/8dc8eb89-6b0a-41af-81ce-870d96af3996
This is what #1724 looks like:
https://github.com/CodeEditApp/CodeEdit/assets/49006567/5e9a5b42-8f6c-4d56-b6b9-67917bfcba77
Good catch, does this PR replace the other one entirely?
Yes it does. They are both minor changes.