Skip to content
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

Can't bind "pane::RevealInProjectPanel" #7485

Closed
1 task done
avetisk opened this issue Feb 7, 2024 · 3 comments · Fixed by #7487
Closed
1 task done

Can't bind "pane::RevealInProjectPanel" #7485

avetisk opened this issue Feb 7, 2024 · 3 comments · Fixed by #7487
Labels
defect [core label] keymap / key binding Feedback for keyboard shortcuts, key mapping, etc

Comments

@avetisk
Copy link

avetisk commented Feb 7, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

While "pane::RevealInProjectPanel" is auto-completed (i.e it is recognized as a valid keybinding) and there is such an item in the context menu on the file tab (which works fine when I click on it), when I press the chosen keybinding (tried different ones), it's not working (i.e nothing happens).

Environment

Zed: v0.120.6 (Zed)
OS: macOS 14.2.1
Memory: 24 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.

2024-02-07T09:22:12 [ERROR] crates/settings/src/keymap_file.rs:89: invalid binding value for keystroke cmd-shift-x, context Some("Editor")

Caused by:
    0: Attempting to build action pane::RevealInProjectPanel
    1: missing field `entryId`
@avetisk avetisk added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Feb 7, 2024
@mrnugget
Copy link
Member

mrnugget commented Feb 7, 2024

Yes, that doesn't work for two reasons:

  1. RevealInProjectPanel requires an argument: entryId. That's the internal ID of the file/dir it should reveal in the panel.
  2. The action is only available in the pane scope, which is where the right click menu is. We'd have to create it in the editor scope too. That's fixable!

@avetisk
Copy link
Author

avetisk commented Feb 7, 2024

Fixing this may also help those who are waiting for the "auto-focus current editor file in explorer pane".

mrnugget added a commit that referenced this issue Feb 7, 2024
Previously it wasn't possible to create a keybinding for this action
because it required an argument.

Now the action takes the active item of the pane and if it's a
multi-buffer the first one.

This also adds a default keybinding for Vim mode: `-` will reveal the
file in the project panel.

Fixes #7485.

Release Notes:

- Added `pane::RevealInProjectPanel` as an action in the command
palette. ([#7485](#7485)).

Co-authored-by: Antonio <antonio@zed.dev>
@mrnugget
Copy link
Member

mrnugget commented Feb 7, 2024

Just merged #7487 -- that should fix your binding problems and adds a default keybinding for Vim mode.

@JosephTLyons JosephTLyons added keymap / key binding Feedback for keyboard shortcuts, key mapping, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] keymap / key binding Feedback for keyboard shortcuts, key mapping, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants