Using 'Toggle command palette' action from palette doesn't close palette #13994

Open
opened 2026-01-31 03:57:57 +00:00 by claunia · 0 comments
Owner

Originally created by @KnapSac on GitHub (May 27, 2021).

Windows Terminal version (or Windows build number)

1.9.1445.0

Other Software

No response

Steps to reproduce

  • Open the command palette
  • Search for: Toggle command palette
  • Hit enter to use that action

Expected Behavior

I'd expect the palette to close when using the Toggle command palette item in the palette. This is also what happens when you use the toggle shortcut while the palette is open.

Actual Behavior

The entered search text is cleared, and the palette remains open. The code responsible seems to be:
b2c2a4c159/src/cascadia/TerminalApp/AppActionHandlers.cpp (L369-L380)

When the command palette is open, and you use the shortcut to toggle its visibility, CommandPalette().Visibility() correctly returns Visibility::Visible and the palette is closed. On the other hand, when using the entry in the palette, CommandPalette().Visibility() returns Visibility::Collapsed, which causes the palette to remain open.

Originally created by @KnapSac on GitHub (May 27, 2021). ### Windows Terminal version (or Windows build number) 1.9.1445.0 ### Other Software _No response_ ### Steps to reproduce - Open the command palette - Search for: `Toggle command palette` - Hit enter to use that action ### Expected Behavior I'd expect the palette to close when using the `Toggle command palette` item in the palette. This is also what happens when you use the toggle shortcut while the palette is open. ### Actual Behavior The entered search text is cleared, and the palette remains open. The code responsible seems to be: https://github.com/microsoft/terminal/blob/b2c2a4c159b7e918ea8aabc9e22f83d58a479002/src/cascadia/TerminalApp/AppActionHandlers.cpp#L369-L380 When the command palette is open, and you use the shortcut to toggle its visibility, `CommandPalette().Visibility()` correctly returns `Visibility::Visible` and the palette is closed. On the other hand, when using the entry in the palette, `CommandPalette().Visibility()` returns `Visibility::Collapsed`, which causes the palette to remain open.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13994