News for hackers. Stuff that matters.
Re:Sublime Text 4 by CrazyStat on Friday May 21, 2021 @08:04AM (#27232965)
How is the editor supposed to know the new filename?
Re:Sublime Text 4 by bouke on Friday May 21, 2021 @08:08AM (#27233002)
Try renaming a file from the Finder currently open in Numbers (macOS). Notice how Numbers picks up the new name. So definitely possible, on macOS at least.
Re:Sublime Text 4 by laszlokorte on Friday May 21, 2021 @09:11AM (#27233562)
On MacOS the file name is only meta data, ie the file has an internal id that does not change, but on other platforms filesystems the filename might be the identifier.
Re:Sublime Text 4 by samus on Friday May 21, 2021 @03:15PM (#27238626)
Every operating system supports subscribing to file and directory changes. That is how the editor can detect there was a change in the first place.
Re:Sublime Text 4 by mkj on Friday May 21, 2021 @09:51AM (#27233974)
If it's renamed in Linux the inode number will remain the same. (Good luck finding where the new file is, I guess Sublime would spot it if it's within the currently opened directory/project with inotify)