You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Creating a new file while current file is unsaved loses content #3232
Creating a new file when the current file is unsaved will create the new file and switch to that tab, but when you switch back all the content in the other tab is now lost.
Can you reproduce the issue?
Steps to reproduce
Create a file, type some content but do not save
Create another new file (I did this by right clicking on the sidebar and hitting New File)
Observe that the new file is opened in a tab and you're automatically switched to that tab
Click back to your old document and you've lost all your unsaved content.
The underlying engine race (a same-frame document swap applying the outgoing document's pending op, which wedged the flush pipeline and dropped edits) was fixed in #2938 (#4658): setContent now cancels the pending deferred-flush and clears the operation cache, and the desktop flushes the active editor before switching tabs. Verified on the current build — typing in an unsaved tab, opening a new file, and switching back keeps the content. Closing as resolved; please reopen if you still see it on a recent build.
Activity
Jocs commentedon Jun 26, 2026
The underlying engine race (a same-frame document swap applying the outgoing document's pending op, which wedged the flush pipeline and dropped edits) was fixed in #2938 (#4658):
setContentnow cancels the pending deferred-flush and clears the operation cache, and the desktop flushes the active editor before switching tabs. Verified on the current build — typing in an unsaved tab, opening a new file, and switching back keeps the content. Closing as resolved; please reopen if you still see it on a recent build.