Repository: microsoft/terminal
File: src/cascadia/TerminalApp/Pane.cpp (C++)

Code before:
    _splitState{ splitState },
    _desiredSplitPosition{ splitPosition },
    _lastActive{ lastFocused }
{
    _CreateRowColDefinitions();
    _borderFirst.Child(_firstChild->GetRootElement());
    _borderSecond.Child(_secondChild->GetRootElement());

    // Use the unfocused border color as the pane background, so an actual color
    // appears behind panes as we animate them sliding in.
    _root.Background(_themeResources.unfocusedBorderBrush);

    _root.Children().Append(_borderFirst);
    _root.Children().Append(_borderSecond);

    _ApplySplitDefinitions();

    // Register event handlers on our children to handle their Close events
    _SetupChildCloseHandlers();

    // When our border is tapped, make sure to transfer focus to our control.
    // LOAD-BEARING: This will NOT work if the border's BorderBrush is set to
    // Colors::Transparent! The border won't get Tapped events, and they'll fall
    // through to something else.
    _borderFirst.Tapped([this](auto& s, auto& e) { _borderTappedHandler(s, e); });
    _borderSecond.Tapped([this](auto& s, auto& e) { _borderTappedHandler(s, e); });
}

// Extract the terminal settings from the current (leaf) pane's control
// to be used to create an equivalent control
INewContentArgs Pane::GetTerminalArgsForPane(BuildStartupKind kind) const
{
    // Leaves are the only things that have controls
    assert(_IsLeaf());
    return _content.GetNewTerminalArgs(kind);
}

// Method Description:
// - Serializes the state of this tab as a series of commands that can be
//   executed to recreate it.
// - This will always result in the right-most child being the focus
//   after the commands finish executing.
// Arguments:
// - currentId: the id to use for the current/first pane
// - nextId: the id to use for a new pane if we split
// - asContent: We're serializing this set of actions as content actions for
//   moving to other windows, so we need to make sure to include ContentId's
//   in the final actions.
// - asMovePane: only used with asContent. When this is true, we're building
//   these actions as a part of moving the pane to another window, but without
//   the context of the hosting tab. In that case, we'll want to build a

Review comment (suggestion):
```suggestion
    _borderFirst.Tapped({ this, _borderTappedHandler });
    _borderSecond.Tapped({ this, _borderTappedHandler });
```

Code after:
    _splitState{ splitState },
    _desiredSplitPosition{ splitPosition },
    _lastActive{ lastFocused }
{
    _CreateRowColDefinitions();
    _borderFirst.Child(_firstChild->GetRootElement());
    _borderSecond.Child(_secondChild->GetRootElement());

    // Use the unfocused border color as the pane background, so an actual color
    // appears behind panes as we animate them sliding in.
    _root.Background(_themeResources.unfocusedBorderBrush);

    _root.Children().Append(_borderFirst);
    _root.Children().Append(_borderSecond);

    _ApplySplitDefinitions();

    // Register event handlers on our children to handle their Close events
    _SetupChildCloseHandlers();

    // When our border is tapped, make sure to transfer focus to our control.
    // LOAD-BEARING: This will NOT work if the border's BorderBrush is set to
    // Colors::Transparent! The border won't get Tapped events, and they'll fall
    // through to something else.
    _borderFirst.Tapped({ this, &Pane::_borderTappedHandler });
    _borderSecond.Tapped({ this, &Pane::_borderTappedHandler });
}

// Extract the terminal settings from the current (leaf) pane's control
// to be used to create an equivalent control
INewContentArgs Pane::GetTerminalArgsForPane(BuildStartupKind kind) const
{
    // Leaves are the only things that have controls
    assert(_IsLeaf());
    return _content.GetNewTerminalArgs(kind);
}

// Method Description:
// - Serializes the state of this tab as a series of commands that can be
//   executed to recreate it.
// - This will always result in the right-most child being the focus
//   after the commands finish executing.
// Arguments:
// - currentId: the id to use for the current/first pane
// - nextId: the id to use for a new pane if we split
// - asContent: We're serializing this set of actions as content actions for
//   moving to other windows, so we need to make sure to include ContentId's
//   in the final actions.
// - asMovePane: only used with asContent. When this is true, we're building
//   these actions as a part of moving the pane to another window, but without
//   the context of the hosting tab. In that case, we'll want to build a