Skip to content

Commit

Permalink
[silmarillion] Fix moving a tab with panes. Now, the non-first panes …
Browse files Browse the repository at this point in the history
…don't rebuild themselves on move
  • Loading branch information
zadjii-msft committed Feb 13, 2023
1 parent 4eba01f commit 7d903de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/cascadia/TerminalApp/ContentManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ namespace winrt::TerminalApp::implementation
{
auto content = ControlInteractivity{ settings, unfocusedAppearance, connection };
content.Closed({ this, &ContentManager::_closedHandler });
_content.Insert(content.Id(), content);
const auto& contentGuid{ content.Id() };
_content.Insert(contentGuid, content);
return content;
}

Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalApp/Pane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ NewTerminalArgs Pane::GetTerminalArgsForPane(const bool asContent) const
Pane::BuildStartupState Pane::BuildStartupActions(uint32_t currentId, uint32_t nextId, const bool asContent)
{
// if we are a leaf then all there is to do is defer to the parent.
if (!asContent && _IsLeaf())
if (_IsLeaf())
{
if (_lastActive)
{
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalApp/TerminalTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ namespace winrt::TerminalApp::implementation
{
// Give initial ids (0 for the child created with this tab,
// 1 for the child after the first split.
auto state = _rootPane->BuildStartupActions(0, 1);
auto state = _rootPane->BuildStartupActions(0, 1, asContent);

{
ActionAndArgs newTabAction{};
Expand Down

0 comments on commit 7d903de

Please sign in to comment.