zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
48.66k stars 2.92k forks source link

File renames are not properly tracked outside of project folders #18805

Open internettechnik opened 2 weeks ago

internettechnik commented 2 weeks ago

Check for existing issues

Describe the feature

Move or rename outside Zed (terminal, macOS Finder): Expected behaviour: reflect changes (renaming) in the title, transparently save to proper expected location next time
Actual behaviour: no feedback on the UI. Creation of new file in the file system on the previous (now old) location

Find attached the expected macOS system behaviour (for example with TextMate Editor) and the buggy Zed behaviour after renaming a file /tmp/hello.txt to /tmp/helloworld.txt.

a-renaming-outside-zed b-expected-renaming-shown-to-user c-unexpected-buggy-zed-ignores-movement-will-create-new-file-on-save

If applicable, add mockups / screenshots to help present your vision of the feature

No response

notpeter commented 2 weeks ago

I can reproduce this, but everything works as expected if the file is inside a project folder.

Steps to reproduce.

mkdir /tmp/issue18805
cd $_
touch hello_world.txt
zed hello_world.txt
mv hello_world.txt hello_dog.txt

If you change the zed command invocation to zed . hello_world.txt there is no an issue.

internettechnik commented 2 weeks ago

I would still consider it as Bug, if a user on the UI cannot detect in any way, that the file visible in Zed() has changed the location in the file system. On upcoming save*-operation a new file is created which might and will be unexpected behaviour.

(*) possibly removed from the file explorer, but still visible in the open editor window