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
41.31k stars 2.17k forks source link

Vim Macros opens command palette after using the macro #13819

Open Artur-Galstyan opened 1 week ago

Artur-Galstyan commented 1 week ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Very simple: record a macro and then replay it. After the replay, the command palette opens up automatically.

Environment

artur.galstyan@PHL-XM97J0M9DL ~ % copy system specs into clipboard
zsh: command not found: copy

:(

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.

Zed.log


mrnugget commented 1 week ago

Is it possible that you did open the command palette while recording a macro? Replaying them works for me, without opening the palette.

https://github.com/zed-industries/zed/assets/1185253/ec44f090-38a2-426a-87fd-0ac3cb4ec447

zsh: command not found: copy

copy systems specs into the clipboard is meant to be run in the command palette:

screenshot-2024-07-04-14 05 44@2x

Artur-Galstyan commented 1 week ago

Yes, I did. More specifically, I pressed these buttons:

q l (start recording on l)

hi there :w test

q (stop recording)

@ l (replay)

output: hi there (command palette opens - "test" is not written)

I would have expected it to just keep going, no?

mrnugget commented 1 week ago

Yeah, I bet that's a limitation of the current implementation. cc @ConradIrwin

ConradIrwin commented 6 days ago

Yes, it is. I think it's fixable though. Currently we only send input to the editor instances, we need to also send it to the command palette to ensure it runs the correct command.