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
50.03k stars 3.06k forks source link

workspace::NewTerminal opens two terminal instead of one #4567

Closed networkhermit closed 7 months ago

networkhermit commented 1 year ago

Check for existing issues

Describe the bug / provide steps to reproduce it

In keymap and command palette, workspace::NewTerminal opens two terminal instead of one. The default key binding ctrl-` is fine though.

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

Ah yeah, its happening because opening the terminal dock, when no terminals exist, automatically adds one, and then the action is adding another. Nice catch @networkhermit.

networkhermit commented 8 months ago

@JosephTLyons

hello, is there any update about this issue?

The Open in Terminal action on folders in the project panel would also opens two terminal instances.

Besides, is it possible to add a custom keybinding to open the directory of the current buffer in terminal? I've tried project_panel::OpenInTerminal but got no luck (#4566):

  {
    "bindings": {
      "shift-k": "project_panel::OpenInTerminal"
    },
    "context": "Editor && vim_mode == normal && !VimWaiting && !menu"
  }
networkhermit commented 7 months ago

@JosephTLyons

hello, is there any update about this issue?

The Open in Terminal action on folders in the project panel would also opens two terminal instances.

Besides, is it possible to add a custom keybinding to open the directory of the current buffer in terminal? I've tried project_panel::OpenInTerminal but got no luck (#4566):

  {
    "bindings": {
      "shift-k": "project_panel::OpenInTerminal"
    },
    "context": "Editor && vim_mode == normal && !VimWaiting && !menu"
  }

@ConradIrwin hi, could you help binging this issue and #4566 to the roadmap? It's not something urgent, but it bugs me for a long time and I have to fall back to vscode for even simple usage.