elementary / code

Code editor designed for elementary OS
https://elementary.io
GNU General Public License v3.0
480 stars 112 forks source link

Cancelling new folder creation in project causes parent folder to disappear from sidebar #1436

Closed jeremypw closed 3 months ago

jeremypw commented 5 months ago

What Happened?

After opening an empty project folder, a new subfolder was created using the project context menu. While in rename mode after creation of "untitled folder" the Esc key was pressed to cancel the operation. Both the subfolder and the project folder disappeared from the sidebar although the project was still active according to the project chooser button. The project folder still existed on disk. Closing and restarting Code caused the project folder to reappear in the sidebar.

Steps to Reproduce

  1. Open an empty project folder
  2. Start to create a new folder but cancel while in rename-after-create mode.
  3. Observe parent folder disappears too

Expected Behavior

The newly created folder should disappear if cancel is pressed before completing the create/rename operation, but not the parent folder.

OS Version

8.x (Early Access)

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

No response