-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
project_panel: Select the newly created file when copy/pasting a file #14705
project_panel: Select the newly created file when copy/pasting a file #14705
Conversation
Don't known if this modify is needed. the CI failed because selected target had changed which is expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the CI failed because selected target had changed which is expected.
If it's expected, we have to update the tests then?
I am also not sure about this test failure:
https://github.com/zed-industries/zed/actions/runs/9984980450/job/27595098698?pr=14705#step:4:919
seems that we've copied a
in that test, selected root
and pasted it there twice:
zed/crates/project_panel/src/project_panel.rs
Lines 3676 to 3680 in eb7fe57
select_path(&panel, "root", cx); | |
panel.update(cx, |panel, cx| panel.paste(&Default::default(), cx)); | |
cx.executor().run_until_parked(); | |
panel.update(cx, |panel, cx| panel.paste(&Default::default(), cx)); | |
cx.executor().run_until_parked(); |
with one a
already existing under root
.
I would expect that there are 2 new entries, root/a copy
and root/a copy 1
and either of them is selected.
I would prefer the latter, but the code is written to prefer the former.
Yet, the test failure shows, that root/a copy/a/
is selected?? Is that the desired behavior?
Maybe I misread the test, and then we just have to adjust the test results, but please double check that part.
5b9fbab
to
36fb3d6
Compare
I think this is desired behavior, and I also check this behavior in VSCode, same in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for confirming that now things work as you'd expect.
close: #14361
Release Notes: