"Share Feedback" modal triggers the "Discard feedback?" modal when escape is pressed in Vim mode
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
The Share Feedback modal triggers the Discard feedback? modal when escape is pressed in Vim mode.
Reproduction
- Configure Zed to use Vim mode.
- Click the Share Feedback button in the dock.
- Click into the text area.
- Hit i to enter insert mode.
- Type some text.
- Hit Escape to exit insert mode.
- Observe the Discard feedback? modal pops up.
Expected Behavior
The Discard feedback? modal should not pop up unless:
- The user is already in command mode in Vim.
- The user clicks the Cancel button.
Environment
Zed: v0.119.20 (Zed) OS: macOS 14.3.0 Memory: 32 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
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.
2024-01-29T18:26:59 [INFO] ========== starting zed ==========
2024-01-29T18:26:59 [INFO] Opening main db
2024-01-29T18:26:59 [INFO] set environment variables from shell:/opt/homebrew/bin/fish, path:REDACTED
2024-01-29T18:26:59 [ERROR] crates/zed/src/zed.rs:538: EOF while parsing a value at line 1 column 0
2024-01-29T18:26:59 [INFO] Opening main db
2024-01-29T18:26:59 [INFO] Node runtime install_if_needed
2024-01-29T18:27:00 [INFO] 0 unhandled notification LogMessage:
{
"level": 0,
"message": "[DEBUG] [agent] [2024-01-29T18:27:00.428Z] Agent service starting",
"metadataStr": "[DEBUG] [agent] [2024-01-29T18:27:00.428Z]",
"extra": [
"Agent service starting"
]
}
2024-01-29T18:27:00 [INFO] 0 unhandled notification client/registerCapability:
{
"registrations": [
{
"id": "d676028c-d18a-4336-a8bc-fe4385acced3",
"method": "workspace/didChangeWorkspaceFolders",
"registerOptions": {}
}
]
}
2024-01-29T18:27:00 [INFO] 0 unhandled notification LogMessage:
{
"level": 0,
"message": "[DEBUG] [agent] [2024-01-29T18:27:00.436Z] Telemetry initialized",
"metadataStr": "[DEBUG] [agent] [2024-01-29T18:27:00.436Z]",
"extra": [
"Telemetry initialized"
]
}
Thanks for the report @sudomateo, we will likely try to look intot this this week.
You're welcome! No rush at all. Thank you all for the great editor.
Some extra info: https://github.com/zed-industries/zed/pull/7569 fixed issues with this modal spawning extra Discard feedback? dialogues popping up, but this one is still not fixed.
The reason for this seems to be the feedback panel reacting to ESC here: https://github.com/zed-industries/zed/blob/8372b4a0784dbce8dae3299830f1338e75dcd42e/crates/feedback/src/feedback_modal.rs#L407-L409
Which suggests that some global Vim-related fix has to be applied, not only related to this modal. cc @ConradIrwin just in case he as some pointers for this
The right fix is probably to make sure vim mode isn't enabled inside the feedback modal (or to change how vim works to bind its actions to the editor instead of the workspace so it takes priority). Neither is super trivial right now unfortunately.