Skip to content

Conversation

@oxcened
Copy link
Contributor

@oxcened oxcened commented Jan 25, 2025

Fixes #234791

Steps to Reproduce

  1. Open a terminal.
  2. Click on the terminal name button.
  3. Choose "Change color..." and select any color in the modal.
  4. Click on the terminal name button again.
  5. Try "Rename...", "Split terminal", or "Kill terminal."
  6. Notice the buttons don't work.

Issue

The problem happens when you pick a color from the modal. When the color is selected, the modal briefly grabs focus, which triggers an onDidFocus event. This event updates _lastFocusedWidget in listService, which is then mistakenly used in the function getSelectedInstances. The function assumes that lastFocusedList is always a TerminalTabList, which isn't always true.

Fix

The fix ensures listService.lastFocusedList is only used when it's a TerminalTabList, not when other widgets like the QuickInputTree are focused.


Let me know if any adjustments are needed!

Copy link
Contributor

@meganrogge meganrogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@vs-code-engineering vs-code-engineering bot added this to the January 2025 milestone Jan 27, 2025
@meganrogge meganrogge enabled auto-merge (squash) January 27, 2025 16:56
@meganrogge meganrogge merged commit d11fdfe into microsoft:main Jan 27, 2025
7 checks passed
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Mar 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

menu options stop working after terminal's color is changed

3 participants