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
46.62k stars 2.64k forks source link

buffer_search::Dismiss not working in Editor keybinding #4564

Open networkhermit opened 1 year ago

networkhermit commented 1 year ago

Check for existing issues

Describe the bug / provide steps to reproduce it

I tried to use ctrl-l to dismiss the buffer_search, but it seems not working in the Editor context. When I replace the keybinding to other command, it works as expected.

  {
    "bindings": {
      "ctrl-l": "buffer_search::Dismiss"
    },
    "context": "Editor"
  }

Environment

Zed: v0.96.4 (stable) OS: macOS 13.4.1 Memory: 16 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.

No response

JosephTLyons commented 1 year ago

This is strange - this actually works for me. @networkhermit, can you paste in your full keymap.json file?

networkhermit commented 1 year ago

@JosephTLyons

When the focus is in editor buffer, buffer_search::Dismiss doesn't work. This can be reproduced if you use * to search word under cursor in vim mode, or make sure your cursor is in text buffer (not the search box) if you don't use vim mode.

{
  "vim_mode": true
}
[
  {
    "bindings": {
      "ctrl-l": "buffer_search::Dismiss",
      "shift-backspace": "zed::OpenSettings"
    },
    "context": "Editor"
  }
]
JosephTLyons commented 1 month ago

Hey @networkhermit, not sure if you are still using Zed or not, but if so, would you be able to check if this is still an issue for you in current Zed?

networkhermit commented 1 month ago

Yes. This issue still persists in the latest stable release Zed 0.145.1.

When the focus is in editor buffer, buffer_search::Dismiss doesn't work. This can be reproduced if you use * to search word under cursor in vim mode, or make sure your cursor is in text buffer (not the search box) if you don't use vim mode.

{
  "vim_mode": true
}

Neither of the following keybinding works.

[
  {
    "bindings": {
      "ctrl-l": "buffer_search::Dismiss"
    },
    "context": "Editor"
  }
]
[
  {
    "bindings": {
      "ctrl-l": "buffer_search::Dismiss"
    },
    "context": "BufferSearchBar"
  }
]