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

Code before:
        // However, with the ability to execute multiple actions at a time, in
        // already existing windows, we need to always raise this event manually
        // here, to correctly inform the Tab that we're now focused. This will
        // take care of commandlines like:
        //
        // `wtd -w 0 mf down ; sp`
        // `wtd -w 0 fp -t 1 ; sp`

        _GotFocusHandlers(shared_from_this());

        _control.Focus(FocusState::Programmatic);
    }
    else
    {
        _firstChild->_FocusFirstChild();
    }
}

// Method Description:
// - Attempts to update the settings of this pane or any children of this pane.
//   * If this pane is a leaf, and our profile guid matches the parameter, then
//     we'll apply the new settings to our control.
//   * If we're not a leaf, we'll recurse on our children.
// Arguments:
// - settings: The new TerminalSettings to apply to any matching controls
// - profile: The GUID of the profile these settings should apply to.
// Return Value:
// - <none>
void Pane::UpdateSettings(const TerminalSettingsCreateResult& settings, const Profile& profile)
{
    if (!_IsLeaf())
    {
        _firstChild->UpdateSettings(settings, profile);
        _secondChild->UpdateSettings(settings, profile);
    }
    else
    {
        // Because this call may be coming in with a different settings tree,
        // we want to map the incoming profile based on its GUID.
        // Failure to find a matching profile will result in a pane holding
        // a reference to a deleted profile (which is okay!).
        if (profile.Guid() == _profile.Guid())
        {
            _profile = profile;
            auto controlSettings = _control.Settings().as<TerminalSettings>();
            // Update the parent of the control's settings object (and not the object itself) so
            // that any overrides made by the control don't get affected by the reload
            controlSettings.SetParent(settings.DefaultSettings());
            auto unfocusedSettings{ settings.UnfocusedSettings() };
            if (unfocusedSettings)
            {

Review comment (suggestion):
```suggestion
// - profile: the profile these settings should apply to.
```

Code after:
        // However, with the ability to execute multiple actions at a time, in
        // already existing windows, we need to always raise this event manually
        // here, to correctly inform the Tab that we're now focused. This will
        // take care of commandlines like:
        //
        // `wtd -w 0 mf down ; sp`
        // `wtd -w 0 fp -t 1 ; sp`

        _GotFocusHandlers(shared_from_this());

        _control.Focus(FocusState::Programmatic);
    }
    else
    {
        _firstChild->_FocusFirstChild();
    }
}

// Method Description:
// - Attempts to update the settings of this pane or any children of this pane.
//   * If this pane is a leaf, and our profile guid matches the parameter, then
//     we'll apply the new settings to our control.
//   * If we're not a leaf, we'll recurse on our children.
// Arguments:
// - settings: The new TerminalSettings to apply to any matching controls
// - profile: The profile from which these settings originated.
// Return Value:
// - <none>
void Pane::UpdateSettings(const TerminalSettingsCreateResult& settings, const Profile& profile)
{
    if (!_IsLeaf())
    {
        _firstChild->UpdateSettings(settings, profile);
        _secondChild->UpdateSettings(settings, profile);
    }
    else
    {
        // Because this call may be coming in with a different settings tree,
        // we want to map the incoming profile based on its GUID.
        // Failure to find a matching profile will result in a pane holding
        // a reference to a deleted profile (which is okay!).
        if (profile.Guid() == _profile.Guid())
        {
            _profile = profile;
            auto controlSettings = _control.Settings().as<TerminalSettings>();
            // Update the parent of the control's settings object (and not the object itself) so
            // that any overrides made by the control don't get affected by the reload
            controlSettings.SetParent(settings.DefaultSettings());
            auto unfocusedSettings{ settings.UnfocusedSettings() };
            if (unfocusedSettings)
            {