-
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
MRU useTabSwitcher prevents switching to tabs in left/right order #9330
Comments
You know, there was another thread around here where we were discussing the same exact thing, the same exact design, but I've lost it now. This is now the "I want to be able to use both MRU and in-order tab switching on different keys" thread. Thanks! EDIT: I found the original thread!
|
Chiming in second this. Glad to see MRU on |
@zadjii-msft - I can add support for:
WDYT? |
Hmm, honestly feels less than ideal? Requiring the use of the tab switcher feels really odd from the outside, especially for those not wanting it? |
Guess I can make it:
If not provided, use global settings. |
That seems reasonable to me. Currently, My only question is what do we do when someone sets |
@zadjii-msft - as suggested in #9390, let's unify these tickets, they come together. |
I'm not sure which ticket to respond to, so I'll stick with this one for now? Doing this:
...doesn't look horrible, but including "useTabSwitcher" in this action definition still feels like combining two things that shouldn't be combined. I'm guessing this is because the existing "tabSwitcherMode" exists, and you are trying to override it? Separately, I'd lean towards renaming "tabSwitchOrder" to something like "direction" or "order" instead (it took me a beat to recognize "tabSwitchOrder" had nothing to do with the tab switcher UI). |
After some hesitation, as I am not sure when I get to #9390, I decided to use the following format:
or
if you don't want tab switcher to show up. It is actually aligned with the global setting. If we decide to add MRU mode with no tab switcher, we can simply add the new value to the enum (aka "disabledMRU"), and this will work for both commands and the settings. |
tbh this setup feels... bizarre. But I guess that's the price of backwards
compatibility? The "if we add MRU support without tab switcher" is also a
slight cause for concern. Also wondering about the kinda-not-standard key
bindings as well?
|
We're not going to be binding this by default - those keys listed are mostly as examples |
Yes.. this is a price of backward-compatibility between the settings and the commands parameters. I tried to do what we discussed earlier and it was confusing as hell 😊 I mean in the global settings you would have an enum, and here you will have two flags, and the entire resolution logic (aka what happens if default is TabSwitcherMode=Disabled, and here useTabSwitcher=True) would be very non-intuitive. With this solution it is relatively simple: if you have enum defined in param - it will be used, default otherwise. Regarding the samples, as Mike said, we are not going to bind them, I put the ones I was using for testing, as an example. |
🎉This issue was addressed in #9507, which has now been successfully released as Handy links: |
This doesn't seem to be working in 1.8.1444.0. See below for repro steps, but it doesn't seem possible to make a config that does this:
Steps: Put this in your config:
I'd expect to have switched to the next right-most tab from "C" (which is "A" at this point), but instead it switches to "B"
I'd expect to go to "A" (and you do!), but note the tab switcher order is listed as "B", "C", "A"
You should be on tab "B" at this point with no tab switcher.
You go to tab "A" instead of "C". Repeating step 10 makes you bounce back and forth between "A" and "B" forever. Given how all this is currently implemented it seems like the only way to hit the original request would be to either introduce an "adjacent" or "leftright" mode for "tabSwitcherMode", or to consider the current "inOrder" behavior a bug, and change it. |
Huh, you're totally right. No matter what mode is set in the action, it still uses the switcher... even if it's |
Wait a moment... We may have fallen prey to legacy command support. Take two of these ("and call me in the morning"): { "command": { "action": "nextTab", "tabSwitcherMode": "disabled" }, "keys": "ctrl+pgdn" },
{ "command": { "action": "prevTab", "tabSwitcherMode": "disabled" }, "keys": "ctrl+pgup" }, EDIT: Substitute |
Yep, that was it exactly - I didn't realize legacy command support was a thing even. Thanks for the catch! |
Description of the new feature/enhancement
I was excited for the MRU tab switching in 1.5, but it looks like the way it was designed there's no way to make it behave like Visual Studio (and other text editors) and support both MRU switching and next/prev (rather: left/right) switching at the same time. What I'm attempting:
The current behavior with useTabSwitcher set to "disabled" or "inOrder" is:
With useTabSwitcher set to "MRU" it's:
And in both cases, the "useTabSwitcher" setting changes the meaning of what the "nextTab" and "prevTab" commands actually do. This causes two undesirable effects:
Proposed technical implementation details (optional)
To fix, you could expose either four new commands:
...or four new "direction" types to the "switchToTab" action:
...which do exactly what they describe, and accomplishes the goal outlined above. None of these commands should be influenced by the "useTabSwitcher" setting (and the "nextTab/prevTab" commands would continue to be influenced to keep existing behavior).
The text was updated successfully, but these errors were encountered: