zed
zed copied to clipboard
Clicking a gitignored file in file tree does not focus the file
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
Steps to reproduce
- Open a folder as a project, where the folder contains three files:
.gitignore
is-ignored.txt
not-ignored.txt
and the contents of the .gitignore file is:
is-ignored.txt
-
Open the file tree. In its starting state, no file should have a focused state.
-
In the file tree, click on
is-ignored.txt. -
Hit the
F2key.
Expected result
- An editor for
is-ignored.txtfile is opened. - In the file tree, the focus is on the
is-ignored.txtfile. - In the file tree, the
is-ignored.txtline is shown in filename editing mode.
Actual result
- An editor for
is-ignored.txtfile is opened. - In the file tree, no file is selected.
Screenshot at the end of the steps to reproduce:
Redoing the same steps but clicking not-ignored.txt instead shows a correct behavior:
Environment
Zed: v0.119.19 (Zed) OS: macOS 14.3.0 Memory: 8 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.
If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.
Log doesn't seem to have a related error for the STR above:
2024-01-26T13:59:10 [ERROR] crates/gpui/src/window.rs:376: window not found
2024-01-26T13:59:15 [INFO] ========== starting zed ==========
2024-01-26T13:59:15 [INFO] Opening main db
2024-01-26T13:59:16 [INFO] set environment variables from shell:/opt/homebrew/bin/fish, path:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/florens/.local/share/mise/installs/node/20.10/bin:/Users/florens/.local/share/mise/installs/ruby/3.1/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/opt/[email protected]/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/homebrew/opt/mise/bin
2024-01-26T13:59:16 [ERROR] crates/zed/src/zed.rs:538: EOF while parsing a value at line 1 column 0
2024-01-26T13:59:16 [INFO] Opening main db
2024-01-26T13:59:16 [INFO] Opening main db
2024-01-26T13:59:19 [INFO] Opening main db
Note that if there was another focused file, the focus remains on that file. With the test project described above:
- In the file tree, click on
not-ignored.txt. - In the file tree, click on
is-ignored.txt. - Hit the
F2key.
The not-ignored.txt will be focused and shown in filename editing mode.
Looks like a straightforward bug where clicking on a gitignored file in the file tree does not change the state of the file tree (though it does change the state of other parts of the editor).
I can no longer reproduce this with Zed 0.146.4 so am going to close. If this is in error, please let me know and I'm happy to reopen. Thanks for reporting!