Sublime Forum

Open non-existant recent file

#1

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?”

0 Likes

#2

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).

0 Likes