microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.01k stars 8.22k forks source link

Duplicate Tab doesn't duplicate split panes #4674

Open keithn opened 4 years ago

keithn commented 4 years ago

Steps to reproduce

Create some spit panes in a tab, then ctrl-shift-d to duplicateTab, new tab is a single pane tab.

Expected behavior

new tab is a duplicate of the split paned tab with the same panes

Actual behavior

single pane tab

zadjii-msft commented 4 years ago

I don't hate the idea of adding a setting to the "newTab" ShortcutAction to enable duplicating panes as well. Thanks for the suggestion!

Something like:

{ "command": { "action": "newTab", "duplicatePanes": true }, "keys": ["ctrl+shift+d"] },
DHowett-MSFT commented 4 years ago

I honestly wonder if duplicating a tab should simply always duplicate its panes. After all, not doing so (and terminal randomly selecting one of the panes under the tab) could be viewed as simply incorrect...

DHowett-MSFT commented 4 years ago

Yanking triage in any case: this is a good backlog item, but if somebody wants to work on it we can pull it ahead.

Don-Vito commented 3 years ago

@DHowett-MSFT - I did some short implementation of panes duplication (that almost works, besides setting the focus in the same pane, that I simply cannot get working), but I am just wondering how useful it is when the panes are created in the initial state (e.g. default directory).

zadjii-msft commented 3 years ago

Maybe it's valuable to do even without the path preservation now, so that when #3158 / #8166 / whatever it ends up being does land, then the path duplication will just start working for duplicated tabs as well.

Personally, I'm the kind of user where I set up each profile's startingDirectory to the root of a project, and typically I stay in the root of each project, so duplicating a bunch of panes that are all in that directory already doesn't seem like a bad thing to me ☺️

Don-Vito commented 3 years ago

@zadjii-msft - I will try to push it then.. hopefully this week / weekend.