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
45.66k stars 2.51k forks source link

Vim INSERT mode freeze after a while #12265

Open kascote opened 3 months ago

kascote commented 3 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

After using the editor for a while, when switch to INSERT mode, the input freeze. See on the video that when open the file picker, the input is frozen there too. In NORMAL mode, the hot keys still work, I'm able to remove lines, copy lines, call the file picker, but all the inputs are frozen. I was unable to reproduce when disable vim mode. I removed and re-installed the application and removed all the extensions too, see that the configuration is the default one only with vim enabled.

Environment

Zed: v0.136.2 (Zed) OS: macOS 14.5.0 Memory: 16 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

https://github.com/zed-industries/zed/assets/9757/c2d2df88-b3c1-474d-92ec-2bdbae2ef4da

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

I don't see any issues on the log file, but attached anyway

2024-05-24T21:15:09-03:00 [INFO] extensions updated. loading 1, reloading 0, unloading 0
2024-05-24T21:15:09-03:00 [INFO] Opening main db
2024-05-24T21:15:10-03:00 [INFO] Node runtime install_if_needed
2024-05-24T21:15:10-03:00 [INFO] starting language server. binary path: "/Users/nelson/Library/Application Support/Zed/node/node-v18.15.0-darwin-arm64/bin/node", working directory: "/", args: ["/Users/nelson/Library/Application Support/Zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"]
2024-05-24T21:15:10-03:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-05-25T00:15:10.858Z] Agent service starting",
  "metadataStr": "[DEBUG] [agent] [2024-05-25T00:15:10.858Z]",
  "extra": [
    "Agent service starting"
  ]
}
2024-05-24T21:15:10-03:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability:
{
  "registrations": [
    {
      "id": "f079f464-587e-446a-b967-a108e639c608",
      "method": "workspace/didChangeWorkspaceFolders",
      "registerOptions": {}
    }
  ]
}
2024-05-24T21:15:11-03:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-05-25T00:15:11.432Z] Telemetry initialized",
  "metadataStr": "[DEBUG] [agent] [2024-05-25T00:15:11.432Z]",
  "extra": [
    "Telemetry initialized"
  ]
}
kascote commented 1 month ago

On my case, since the latest 2 releases, the problem resolved and I'm able to use the editor as always. It didn't happened again. I don't closed the ticket, because there is another user that thumb-up the issue.

AjithPanneerselvam commented 6 days ago

I'm running the latest Zed version (v0.148.1) and face the exact problem as described in this issue.

Also created an issue with screen recording and logs from my side. Feel free to close it to avoid duplicate issue.

https://github.com/user-attachments/assets/6182973c-ba85-46a1-a0a7-48149376f0f6

smpanaro commented 3 days ago

I'm seeing this on v0.149.5. When it happens I cannot insert text anywhere in the UI. However I can execute commands like copy, paste, and use vim normal mode.

I also noticed that if I turn off vim mode in settings.json after it happens (Cmd+/ and Cmd+S) I still cannot edit text. Restarting fixes it.

Edit: Running from source I am able to reproduce this on main (28271a9a36), v0.148.0, and v0.147.2 as well. Still not sure how to trigger it on demand.

Has not yet repro'd in v0.145.1 after a couple hours. v0.146.3 seems ok after ~1 hour.