Home Download Buy Blog Forum Support

Open non-existant recent file

Open non-existant recent file

Postby jburnett on Fri Jul 29, 2011 1:48 am

If there is a file in the "Open Recent" file list that no longer exists, and you try to open it, Sublime will go ahead and create an empty buffer with that name. It might make more sense to pop up a prompt asking "File does not exist, create new?"
Posts: 95
Joined: Wed Jul 27, 2011 9:23 pm

Re: Open non-existant recent file

Postby jps on Fri Jul 29, 2011 3:55 am

It's tricky.

When opening a file, no file IO is allowed to be done in the main thread, for performance reasons. It's possible to do an async stat on the file before opening a tab, but on slow, remote file systems, that can sometimes take several seconds, and I don't want to wait that long without giving UI feedback.

I'd rather eliminate non-existent files from the MRU list entirely, but doing that properly is a surprisingly tricky thing to do (considering slow file systems, file systems that don't provide notifications, and removable file systems).
Site Admin
Posts: 3217
Joined: Wed Mar 19, 2008 12:33 pm

Return to General Discussion

Who is online

Users browsing this forum: fevan and 42 guests