terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Opening a New Pane with "-" or "+" Opens the First Profile, Regardless of Current Profile

Open parasnailor opened this issue 5 years ago • 10 comments

Description

When opening a new split pane with alt+shift+d, the new pane will be of the same terminal profile as the pane from which it was spawned. However, when specifying a vertical or horizontal split pane with alt+shift+plus or alt+shift+minus, the new pane is always of the first terminal profile listed under "profiles" in "settings.json." This is undesirable for two reasons:

  1. It can result in terminal tabs of mixed profiles. In my use case, it results in a terminal tab running the Powershell profile, with a split pane running the Ubuntu WSL profile. It's possible that this is intended behavior, but I found it confusing.
  2. There is currently no way (that I know of) to open a new split pane and specify a vertical or horizontal split for any profile except for the first one. Attempting to specify a vertical or horizontal split for any profile other than the first always results in a split pane running the first profile.

Expected Behavior

I would expect that behavior (in terms of which profile is used for the pane) would at least be consistent between alt+shift+d and alt+shift+minus/plus. Optimally, I would expect that all three shortcuts would always spawn a new split pane of the same profile that was active when the shortcut was entered.

parasnailor avatar Sep 17 '20 20:09 parasnailor

Windows Terminal Issue

Attached is an image of a terminal tab running Powershell (my # 2 profile) in the left (original) pane. alt+shift+d was used to open the pane in the top right, which is (correctly) running Powershell. alt+shift+minus was used from the top right pane to open the bottom right pane, which is (incorrectly) running WSL Ubuntu, my # 1 profile. Note the different theme, as well as the tab title changing to that of my Ubuntu WSL profile.

parasnailor avatar Sep 17 '20 20:09 parasnailor

So, we've heard this issue time and time again and we've always closed it and said "you can set these bindings up yourself; just add "split": "duplicate" to your version of the split pane bindings". I'm no longer convinced that our default behavior should be so... weird.

If a bunch of users are asking for it, and telling us that Terminal's done something unexpected, we should probably do the "expected" thing.

@cinnamon-msft, @zadjii-msft: I propose that we make the split pane bindings duplicate by default.

DHowett avatar Sep 18 '20 00:09 DHowett

I'm down for this. 👍

cinnamon-msft avatar Sep 18 '20 18:09 cinnamon-msft

I faced this problem too and almost started to write a new bug report. I see two ways of fixing it:

  1. Add "splitMode": "duplicate" into the default bindings of alt+shift+plus and alt+shift+minus, as already mentioned above. But users who are good with current key bindings of split pane may not like this change.
  2. Add following two new bindings by default:
    { "command": { "action": "splitPane", "split": "horizontal", "splitMode": "duplicate"}, "keys": "alt+shift+numpad_minus" },
    { "command": { "action": "splitPane", "split": "vertical", "splitMode": "duplicate"}, "keys": "alt+shift+numpad_plus" }
    
    With those new bindings, when you split, for example, a pane of an SSH profile you may choose between opening a new SSH session into the same remote machine or the default profile that's usually a local CMD or Powershell. Also it doesn't change an existing behavior and users that are good with the current default bindings of split pane will not complain.

@DHowett

So, we've heard this issue time and time again and we've always closed it and said "you can set these bindings up yourself; just add "split": "duplicate" to your version of the split pane bindings".

Please don't close without fixing.

rostidev avatar Sep 28 '20 11:09 rostidev

If Kayla agreed, any reason we do not enable it by default?

Don-Vito avatar Feb 07 '21 20:02 Don-Vito

I'm also of the opinion that this behavior should occur by default. Seems counterintuitive that splitting panes results in a new profile.

awa5114 avatar Jan 29 '22 14:01 awa5114

Yeah, this should be default and is still an issue, it is still not duplicate of original shell you've opened by default when opening new split it opens the "first profile" and not the one you are working with.

leet0rz avatar Jun 15 '22 09:06 leet0rz

I'd just like to be able to split a pane and choose the profile even if i had to do it with my mouse. I still figure out how to do that. I've just resorted to using bash for everything and then immediately running cmd.exe or pwsh.exe as i need to but that's a bummer...

I'd really appreciate a key to add to let me pick whatever profile i want... like when i do "shift-alt-minus" the default profile is used, cool but if I do "shift-ctrl-alt-minus" then i get to pick what profile to use

dovholuknf avatar May 26 '23 22:05 dovholuknf

Looping back on this after years: team consensus is that this is a good idea and we're gonna do this for 1.20. As well as include the old JSON in the patch notes, for users who want to go back. Thanks for the patience folks ☺️

zadjii-msft avatar Oct 02 '23 20:10 zadjii-msft

Looping back on this after years: team consensus is that this is a good idea and we're gonna do this for 1.20. As well as include the old JSON in the patch notes, for users who want to go back. Thanks for the patience folks ☺️

The system works!

parasnailor avatar Oct 05 '23 19:10 parasnailor

I see no reason to be willfully ignorant of the users' context by default. I would have filed a bug for this behaviour too if I didn't see this.

b-hayes avatar May 21 '24 01:05 b-hayes