Can't accept partial Edit Prediction in Subtle Display Mode
Summary
When changing Edit Prediction Display Mode it seems impossible to accept partial predictions
Steps to trigger the problem:
- Have the Edit Prediction Display Mode set to Eager and accept partial with
ctrl-cmd-right(standard key binding) - Change the Display Mode to Subtle and try to accept partial with same key combination
Actual Behavior:
It seems that when the Display Mode is set to Subtle and you press alt to see the suggested code, when you press any other key, fx ctrl to do the first key of accept partial, then the suggestion disappear and you can't accept partial.
Expected Behavior: I expect that you can accept partial suggestion like you can do in Eager Display Mode
Zed Version and System Specs
Zed: v0.179.2 (Zed) OS: macOS 15.3.0 Memory: 64 GiB Architecture: aarch64
ran into the same issue
Yep, I can reproduce. The two keybinds do not work well together.
Holding alt prevents one from using the cmd-ctrl-right keybind because if you release alt or press one of those keys the prediction goes away.
This keymap doesn't seem to work for me (macOS dings, zed doesn't see the event).
I would love to have a keybind which includes alt so the two can be used together.
{
"context": "Editor && mode == full && edit_prediction",
"bindings": {
"ctrl-alt-cmd-right": "editor::AcceptPartialEditPrediction"
}
},
As written on Discord, I have tested it on my side with the keymap @notpeter has as an example, and my Zed instances see the event, however it doesn't do anything, because when I press any other key together with alt, the edit prediction disappears
Not sure if the keyboard layout have anything to do with it, but as shown in my picture, my keyboard layout is Danish
I found my conflict with ctrl-alt-cmd-right (Rectangle.app).
Yes, it looks like we would need do something explicitly to the editor::AcceptPartialEditPrediction action to make it support being used in subtle mode. The above keymap is insufficient.
I can see there's a fix to fix the issue with not being able to accept partial when using subtle mode, however I'm not sure it's the correct solution. If I press the alt key I can see the suggested code, but when I press any key, it disappear. I can tho accept partial, but only when alt isn't pressed. I imagined I should be able to see the suggested code while accepting partially. Right now I have to see what's suggested, then release alt key and accept partially, and eventually maybe press alt key again to see if I accepted everything I wanted.
I have build from source, and that was my experience. Is that expected behavior or?
@jacorpski Thanks for following up on this! Indeed it should also display it when the modifiers for AcceptPartialEditPrediction are held, and #32212 adds that.