zed icon indicating copy to clipboard operation
zed copied to clipboard

Fix tab and shift+tab scroll behavior in picker

Open smltr opened this issue 10 months ago • 1 comments

Previously when the picker (command palette, file finder) was open and tab was pressed, space would be inserted into the editor. When shift+tab was pressed, nothing would happen.

Based on other binds in the default keymap, the expected behavior is for tab to the next item and shift+tab to navigate to the previous. This default behavior is also what I, and I imagine others, expect to happen based on defaults in other editing software.

Also, after typing into the file picker, the selection is reset to the first item, whereas for the command palette, the index of the item selected is kept after typing and potentially changing the returned matched items.

This PR changes the command palette to function like the file picker in this regard (reset to select first item after typing) and changes the default binds under Picker > Editor to allow for tab and shift+tab navigation.

Release Notes:

  • Fixed tab and shift+tab behavior when using command palette and file picker

smltr avatar Apr 30 '25 16:04 smltr

I think "tab": "picker::ConfirmCompletion" is used to autocomplete in the non-native project picker (workspace::Open with "use_system_path_prompts": false)

5brian avatar May 07 '25 03:05 5brian

Either way, quite stale now so maybe another time.

SomeoneToIgnore avatar May 21 '25 07:05 SomeoneToIgnore