zastrowm/vs-NavigateTabGroups

Unfortunately doesn't work when the same Document is open in multiple tab groups and/or multiple windows spread across monitors

spiralsam opened this issue · 7 comments

The order of tabbing left/right or next/previous is severely altered, not from logical spacial coordinates left/right or up/down than you'd expect. Active tab switch jumps around instead.

By Document open in multiple tab groups I mean go to VS main menu bar: &Window -> &New Window. Then drag that new duplicate window to horizontal or vertical tab groups. This is best done by having many more than 2 duplicates across different monitors, shuffled randomly around from the order in which they were created - added bonus for mixing in duplicates of different files alongside non duplicates. This is just to see the exaggerated effect of the altered order that attempting to tab through provides. The active tab of any single group in any window cannot be the same filename, or else tab ordering breaks -- unless any are undocked (&Window ->&Float), in which case it doesn't seem to matter which tab is ultimately the active (front) tab or matter if there is more than one in any given tab group for that window.

Otherwise if you have only 1 VS window, 1 monitor, and only ever 1 instance of any given Document open at a time, all seems to work as expected. But that makes using VS only a little slightly boring. :)

Could you clarify a bit as to what the issue is?:

  1. If a given document is opened multiple times, the order becomes messed up
  2. If multiple windows are opened, the order becomes messed up
  3. Both 1 & 2 cause issues separately
  4. The combination of 1 & 2 causes issues

Assuming that the issue is (1), multiples of the same document being opened results in weird ordering that sometimes even skips the repeated document, I believe that I reproduced it, and possibly have a fix for it. I will provide an update the next time I have a chunk of time to test it.

By the way, I had no idea you could open the same document multiple times; this is a feature that I've wanted before, so thanks for letting me know, even if it was accompanied by a bug report :: )

I've been using VS a long long time and still find new things all the time myself, ha. :)

It's 3. It's good that you were able to reproduce 1. As for 2, it doesn't matter if any given document is open more than once or not using that &Window->&Float option (as 1 required), so it does appear separate.

I've taken a closer look at 2 now to help narrow it down a bit. and looking more closely I am able to reproduce it by:

  1. open some extra documents and float them out into their own windows. in my case I made sure they were all opened separately as unique documents, not any created by &Window->&Float.

  2. of those floating windows, dock 2 or more of them together inside their own single floating window via a horizontal split. <-- very much required. it looks suspiciously like this step ultimately is what causes the tab reordering

Repeat these steps as many times as you like. The more floating windows you end up with after experimenting, the easier it becomes able to notice and likely that it happens. In fact, inside these undocked-and-horizontally-split windows, it ends up that some of the documents split within are even skipped altogether when navigating - at least for me.

Incidentally after testing more, I did just realize that I don't really know the difference between Left/Right navigation and Next/Previous navigation or thought they each meant something else (like forward/backward recently-used like a web browser or something?), but it ended up not being so relevant since I'm pretty sure tabs are not supposed to be skipped altogether. :)

Version 1.3.0 of the extension should address the problems you brought up. Let me know how it works out for you.

Also, the expected difference between Right/Left vs Next/Previous is that Right/Left will bypass vertical movement, so top & bottom items are not included, while next/previous navigates both horizontally and vertically. But of course if it's buggy, you won't notice that :: )

There's a new bug now. Actually two. :D Although I stumbled upon the second one. As I test these latest changes, things seemed okay up to the point of reaching the conditions for the new bug, so I couldn't "fully" test. But as long as there are only layouts specifically limited to ones created by the steps above, that part of the issue may be resolved. Then again, at least one new issue might be related or a continuing part of this issue. Not sure, so just going to post one here and the other less likely related as a new issue.

Here's result of testing:

Follow the steps:

  1. Have 3 documents windows open. Undock/float 2.
  2. Dock these 2 into their own single floating window, by placing them on top of each other into their own single tabbed group (as opposed to earlier instructions of splitting horizontally)
  3. Navigate alternating between Left/Right/Next/Previous. The more floating-and-tabbed windows like this, the more tab reordering is noticeable (even surprising one-way circular loops :).

Good to know the difference between Next/Previous and Right/Left finally, though!

@spiralsam could you file a new issue for this and possibly include a gif or screenshot of how you have it setup? I'm having trouble reproducing it.