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

Created on 17 Sep 2020  路  4Comments  路  Source: microsoft/terminal

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.

Area-Settings Issue-Question Issue-Task Product-Terminal

Most helpful comment

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_.

All 4 comments

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.

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_.

I'm down for this. 馃憤

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amithegde picture amithegde  路  114Comments

privacyguy123 picture privacyguy123  路  131Comments

MoshiBin picture MoshiBin  路  128Comments

Paul-Weisser picture Paul-Weisser  路  71Comments

conioh picture conioh  路  65Comments