-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Update CommandPalette.cpp to ignore _filterTextChanged on TabSwitchMode #16858
Merged
DHowett
merged 4 commits into
microsoft:main
from
AlejandroBlanco2001:next_prev_tab_command_fix
Mar 14, 2024
Merged
Update CommandPalette.cpp to ignore _filterTextChanged on TabSwitchMode #16858
DHowett
merged 4 commits into
microsoft:main
from
AlejandroBlanco2001:next_prev_tab_command_fix
Mar 14, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
microsoft-github-policy-service
bot
added
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Area-User Interface
Issues pertaining to the user interface of the Console or Terminal
Priority-2
A description (P2)
Product-Terminal
The new Windows Terminal.
labels
Mar 10, 2024
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
lhecker
approved these changes
Mar 12, 2024
DHowett
approved these changes
Mar 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this! Sorry for the delay - it's our company hackathon this week, so folks have their attention elsewhere :)
DHowett
pushed a commit
that referenced
this pull request
Mar 21, 2024
…de (#16858) As mentioned in #11146, when the "Next/Prev" command is executed from the command line with a string in the search bar, this is setting always the first tab. When using the command "Next/Previous Tab" from the command line, we are creating another tab (as if we are using the keyboard shortcut), and this triggers the `_filterTextChanged` that resets the index to the first item in because the current mode that it has. This could be cause because, It seems that it detects as if we are deleting the entered letter or creating an empty string, causing the execution of the mentioned method and resetting its index to 0. To avoid this, we are making sure that when this action is triggerd and we are in the `TabSwitchMode`, we should ignore the following execution of the method. ## Validation Steps Performed I tested out the following scenarios: 1. Performing the action with the keyboard shorcut 2. Perfoming the action with an empty string 3. Performing the action with a string in the search bar. Also validated with the current tests. Closes #11146 (cherry picked from commit 806d5e2) Service-Card-Id: 92139800 Service-Version: 1.20
DHowett
pushed a commit
that referenced
this pull request
Mar 21, 2024
…de (#16858) As mentioned in #11146, when the "Next/Prev" command is executed from the command line with a string in the search bar, this is setting always the first tab. When using the command "Next/Previous Tab" from the command line, we are creating another tab (as if we are using the keyboard shortcut), and this triggers the `_filterTextChanged` that resets the index to the first item in because the current mode that it has. This could be cause because, It seems that it detects as if we are deleting the entered letter or creating an empty string, causing the execution of the mentioned method and resetting its index to 0. To avoid this, we are making sure that when this action is triggerd and we are in the `TabSwitchMode`, we should ignore the following execution of the method. ## Validation Steps Performed I tested out the following scenarios: 1. Performing the action with the keyboard shorcut 2. Perfoming the action with an empty string 3. Performing the action with a string in the search bar. Also validated with the current tests. Closes #11146 (cherry picked from commit 806d5e2) Service-Card-Id: 92139799 Service-Version: 1.19
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-User Interface
Issues pertaining to the user interface of the Console or Terminal
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Priority-2
A description (P2)
Product-Terminal
The new Windows Terminal.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
As mentioned in the issue #11146, when the "Next/Prev" command is executed from the command line with a string in the search bar, this is setting always the first tab.
References and Relevant Issues
#11146
Detailed Description of the Pull Request / Additional comments
When using the command "Next/Previous Tab" from the command line, we are creating another tab (as if we are using the keyboard shortcut), and this triggers the
_filterTextChanged
that resets the index to the first item in because the current mode that it has.This could be cause because, It seems that it detects as if we are deleting the entered letter or creating an empty string, causing the execution of the mentioned method and resetting its index to 0.
To avoid this, we are making sure that when this action is triggerd and we are in the
TabSwitchMode
, we should ignore the following execution of the method.Validation Steps Performed
I tested out the following scenarios:
Also validated with the current tests.
PowerShell.2024-03-10.21-43-29.mp4
PR Checklist