CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

🐞 Source editor disappears when deleting all text

Open austincondiff opened this issue 1 year ago • 8 comments

Description

Deleting all text from the source editor results in the source editor being replaced by a QuickLook view.

To Reproduce

  1. Open a project
  2. Open a file in the project
  3. Delete all of the text in the file
  4. 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

austincondiff avatar May 17 '24 20:05 austincondiff

@plbstl I believe this was introduced in your recent PR #1707. Would you be able to take a look at this one?

austincondiff avatar May 17 '24 20:05 austincondiff

I see. I'm taking a look at it now

plbstl avatar May 18 '24 00:05 plbstl

Whoops, didn't see @plbstl was taking a look. I've got a PR open for this now it was a very small fix.

thecoolwinter avatar May 18 '24 16:05 thecoolwinter

Oh okay. I'll also test it out

plbstl avatar May 19 '24 00:05 plbstl

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

plbstl avatar May 19 '24 01:05 plbstl

This is what #1724 looks like:

https://github.com/CodeEditApp/CodeEdit/assets/49006567/5e9a5b42-8f6c-4d56-b6b9-67917bfcba77

plbstl avatar May 19 '24 01:05 plbstl

Good catch, does this PR replace the other one entirely?

FastestMolasses avatar May 19 '24 02:05 FastestMolasses

Yes it does. They are both minor changes.

plbstl avatar May 21 '24 22:05 plbstl