-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Version 1.5.3142.0: Unexpected behaviour in tab switcher with "inOrder" mode and custom nextTab/prevTab binding #8247
Comments
I have the default nextTab/prevTab binding and it's not working right for me either, so probably not related to keybindings |
@justinkb - are you sure you have "tabSwitcherMode": "inOrder" setting? |
The problem happens for me only for custom binding and only if I continue holding shift. In this situation we somehow call CommandPalette::SelectNextItem where no item is still selected.
|
@zadjii-msft - it looks that there are two code paths for Ctrl+Tab and for everything else: Ctrl + Tab is working perfectly
But with custom binding things are screwed:
I am working on some fix, let's continue the discussion in the PR once it is open. |
I'm just using ctrl+tab, and I do have "tabSwitcherMode": "inOrder" in my settings.json, and it works only alternatingly, like with your use case. Is there any easy way I can create a quick screen cast video to demonstrate the behavior? In any case, since the tab switcher is a regression for my workflow anyway, I'm just disabling it entirely. |
@justinkb - thanks for the reply! If you could create a screen capture it could really help:
To create the captures I usually use https://www.screentogif.com/ (which is free and doesn't require installation). |
About to go to sleep, I'll take another look at this tomorrow, or over the weekend, cheers |
There are two code paths for Ctrl+Tab and for everything else: Ctrl + Tab is working perfectly * On the first tab navigation TerminalPage::_SelectNextTab resets the tab commands, and since palette is not visible selects the relevant tab index * On the second navigation Ctrl+Tab is intercepted by CommandPalette::_previewKeyDownHandler and everything works fine But with custom binding things are screwed: * On the first tab navigation TerminalPage::_SelectNextTab resets the tab commands, and since palette is not visible selects the relevant tab index * On the second navigation keys are not intercepted and thus TerminalPage::_SelectNextTab is called again. It resets the commands, but now since the palette is visible we simply invoke CommandPalette::SelectNextItem. Which in turn misbehaves because no item is selected. The approach for the solution is not to reset anything if the command palette is already open. ## Validation Steps Performed * Manual testing of both custom and non-custom bindings with different amount of tabs. Closes #8247
@justinkb - this issue was auto-closed since the custom binding fix was merged. Yet if you have a capture for non-custom binding please attach it here or open a new ticket and I will take a look. |
@Don-Vito Why do you break the tool that always worked? Just switch the tab forward - this is a hemorrhoid for 10 seconds, turn it back, another hemorrhoid for 10 seconds. We made a new function, so let people put it and enable it, leave the working version by default. How do I get it back? your "useTabSwitcher" : false , not "tabSwitcherMode" : "inOrder" do not work, as tabs switch randomly, and continue. 1.4.3141.0. With all the nerves burned. |
Hey don't throw shade at @Don-Vito, he's just a contributor who's fixed a bunch of bugs. You can throw shade at me, or anyone else in the Microsoft org, but not other external contributors |
|
@zadjii-msft - few things:
|
This comment has been minimized.
This comment has been minimized.
@Don-Vito I apologize for my emotional outburst, I just tried to read the documentation, they told us how to do it, to return it, I did it, it didn't work, I went to read the comments, and who wrote what helped them, but I still couldn't work, I had to abandon terminal, and look for a new terminal to continue working. Thanks for the answer. And yes, I understand what people are behind the code, and what people are asking about the function, but probably start it correctly, describe how to enable it, and then, if everything is fine, and it is so necessary by default, enable it, and not immediately on release ... And so in the beginning I look for everything in the comments, in the documentation, looking for solutions trying to understand. But it doesn't work. All the best. |
@Tira007 - we are good, I absolutely get your frustration and I totally agree that changing default behavior should be treated very carefully. I am not on the team, but I would suggest (for major use-cases at least):
BTW, not sure if it was applicable in your scenario, for critical scenarios I simply pin the version, e.g., with chocolatey:
In any case, there is a bunch of other good terminals, that will hopefully meet your needs. Hope that one day you try this one again, as the team and the community is learning and improving. |
Don-Vito:
Indeed. In my opinion this change in tab behavior to mru by default was a not a good thing. Tabs changing is such a basic thing with tabbed terminals, changes to tab behavior should not be done without careful consideration. Anyway, I consider the tabbed interface model to copy from to be browsers - especially new Edge - so the default behavior should be the same as there, i.e. "disabled" (or in 1.4 "useTabSwitcher": false). But I guess it's way too late for this discussion, that ship already sailed. |
Hey everyone, Thanks for bearing with us while we make our mistakes. I'm going to release a quick servicing update to both 1.4 and 1.5 that flips the default back to the way it's been for the past year and a half. MRU will be opt-in, and when #1564 lands it'll be easier to find than "just go your JSON settings and type in whatever magic string we tell you to." I accept that we allowed a vocal subset of our users to dictate what our default settings should be, to the detriment of the folks who've been using Terminal the longest. If all goes to plan, these updates will go out as 1.4.3241 and 1.5.3242. /cc @WilliamKyle @davidchisnall @zachjweiner from #8233 d |
Thanks @DHowett, great to see all of the improvements in the terminal (and happy to be running the preview version so things like this get caught before most users see them)! |
There are two code paths for Ctrl+Tab and for everything else: Ctrl + Tab is working perfectly * On the first tab navigation TerminalPage::_SelectNextTab resets the tab commands, and since palette is not visible selects the relevant tab index * On the second navigation Ctrl+Tab is intercepted by CommandPalette::_previewKeyDownHandler and everything works fine But with custom binding things are screwed: * On the first tab navigation TerminalPage::_SelectNextTab resets the tab commands, and since palette is not visible selects the relevant tab index * On the second navigation keys are not intercepted and thus TerminalPage::_SelectNextTab is called again. It resets the commands, but now since the palette is visible we simply invoke CommandPalette::SelectNextItem. Which in turn misbehaves because no item is selected. The approach for the solution is not to reset anything if the command palette is already open. ## Validation Steps Performed * Manual testing of both custom and non-custom bindings with different amount of tabs. Closes #8247 (cherry picked from commit 0437fe9)
There are two code paths for Ctrl+Tab and for everything else: Ctrl + Tab is working perfectly * On the first tab navigation TerminalPage::_SelectNextTab resets the tab commands, and since palette is not visible selects the relevant tab index * On the second navigation Ctrl+Tab is intercepted by CommandPalette::_previewKeyDownHandler and everything works fine But with custom binding things are screwed: * On the first tab navigation TerminalPage::_SelectNextTab resets the tab commands, and since palette is not visible selects the relevant tab index * On the second navigation keys are not intercepted and thus TerminalPage::_SelectNextTab is called again. It resets the commands, but now since the palette is visible we simply invoke CommandPalette::SelectNextItem. Which in turn misbehaves because no item is selected. The approach for the solution is not to reset anything if the command palette is already open. * Manual testing of both custom and non-custom bindings with different amount of tabs. Closes #8247 (cherry picked from commit 0437fe9)
🎉This issue was addressed in #8250, which has now been successfully released as Handy links: |
🎉This issue was addressed in #8250, which has now been successfully released as Handy links: |
Environment
Steps to reproduce
Set
and custom keybindings for nextTab and prevTab, e.g.
Open two tabs or more. Fiddle with the custom keybinds, keep modifier down and press e.g. a key multiple times. Compare to standard ctrl-tab or control-shift-tab bindings.
Expected behavior
Behaviour of nextTab and prevTab is the same with custom bindings as default bindings
Actual behavior
Tabs get changed seemingly randomly. E.g. with four tabs, nextTab second press (modifier kept down) gets stuck to first tab, prevTab to third tab.
Notes
This is not very important, I can personally get the behavior I want by setting tabswitcher to "disabled". Still, this is something that clearly is unexpected, or rather, wrong behavior.
The text was updated successfully, but these errors were encountered: