Skip to content

Commit c5bc0ea

Browse files
committed
Split Panes inherit tab color and title of active pane
Previously to this PR if you split a pane as suggested in #18930, the split pane will lose its custom title and will not have its custom color, with this PR it will keep as indicated
1 parent e332c67 commit c5bc0ea

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/cascadia/TerminalApp/TerminalPage.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3285,6 +3285,19 @@ namespace winrt::TerminalApp::implementation
32853285
{
32863286
controlSettings.DefaultSettings().StartingDirectory(workingDirectory);
32873287
}
3288+
// Copy Title and Color of tab you split
3289+
controlSettings.DefaultSettings().StartingTitle(terminalTab->Title());
3290+
const auto color = terminalTab->GetTabColor();
3291+
if (color.has_value())
3292+
{
3293+
const auto& rawColor = color.value();
3294+
controlSettings.DefaultSettings().StartingTabColor(
3295+
winrt::Microsoft::Terminal::Core::Color{
3296+
rawColor.R,
3297+
rawColor.G,
3298+
rawColor.B,
3299+
rawColor.A });
3300+
}
32883301
}
32893302
}
32903303
if (!profile)

0 commit comments

Comments
 (0)