vscode-restore-git-branch-tabs
vscode-restore-git-branch-tabs copied to clipboard
Does restore tabs in same order
When you switch between branches with multiple tabs (6+) open in each, it doesn't open them in the same order they were last time you had that branch checked out.
If it were a tradeoff between retaining the tab order and taking twice as long to open the tabs, I would rather retain the order.
I am not sure if this is possible with the current API. But I agree, I like keeping the order of the tabs. I will try to look into this.
@gkotas any progress on this? I just found the extension and it's great, but this is kinda a deal-breaker for me
I ended up digging into this on my own for a bit to see if I could figure it out. I pretty quickly found that DocumentManager#open is what will likely need to be updated to accomplish this.
The difficulty is that VSCode's API doesn't seem to have (afaict) a reliable way to get the editor grid data. There's ViewColumn, but I have no idea how that works. The docs are not very helpful. It gives a number, but it doesn't seem to have any concept of the 2d grid or the editor sizes.
Also worth noting, there's an open GH issue for a new "Open Editors" API. Maybe that would provide what we need for this, but I'm not sure.
Just an update here: it looks like that GH issue was resolved, so I think this feature could be implemented now! Maybe if I get annoyed enough, I'll dig into it myself, but if anyone else gets the chance first, go for it.
The docs for the new API are here: https://code.visualstudio.com/api/references/vscode-api#TabInputText