Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicting "accept partial inline completion" key binding, discards rest of line #19715

Open
1 task done
alexkirsz opened this issue Oct 25, 2024 · 0 comments
Open
1 task done
Labels
admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue

Comments

@alexkirsz
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

The current default key binding for editor: accept partial inline completion is cmd+right. On macOS, this conflicts with the default behavior of cmd+right, which is "jump to end of line".

This means that the behavior of cmd+right depends entirely on whether there is a proposed code completion at the moment. So if the model has a bit of latency, you might end up accepting a completion you didn't mean to, because you were trying to jump to end of line. This behavior is very surprising and jarring coming from VS Code, which does not have this binding (or at least not on an existing binding).

Furthermore, accepting a partial inline completion discards whatever text was following it on the current line (see video). This can probably be classified as a separate bug. Let me know and I'll create another issue.

Screen.Recording.2024-10-25.at.08.48.59.mov

Expected behavior:

  1. On macOS, cmd+right is always "jump to end of line", and never anything else.
  2. editor: accept partial inline completion does not discard the rest of the line.

Actual behavior:

  1. Depending on whether there is a completion suggestion, cmd+right is either "jump to end of line" or "accept partial inline completion".
  2. editor: accept partial inline completion discards all characters right of the cursor.

The key binding and action were implemented in #8020

Environment

Zed: v0.158.2 (Zed)
OS: macOS 14.6.1
Memory: 32 GiB
Architecture: aarch64

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

No response

If applicable, attach your Zed.log file to this issue.

Zed.log
@alexkirsz alexkirsz added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue
Projects
None yet
Development

No branches or pull requests

1 participant