Repository: microsoft/terminal
File: src/cascadia/TerminalControl/TermControl.cpp (C++)

Code before:
        // Convert it to pixels
        const auto scale = SwapChainPanel().CompositionScaleX();
        const til::point relativeToMarginInPixels{
            til::math::flooring,
            relativeToMarginInDIPs.x * scale,
            relativeToMarginInDIPs.y * scale,
        };

        return relativeToMarginInPixels;
    }

    // Method Description:
    // - Composition Completion handler for the TSFInputControl that
    //   handles writing text out to TerminalConnection
    // Arguments:
    // - text: the text to write to TerminalConnection
    // Return Value:
    // - <none>
    void TermControl::_CompositionCompleted(winrt::hstring text)
    {
        if (_IsClosing())
        {
            return;
        }

        // SendInput will take care fo broadcasting for us.
        SendInput(text);
    }

    // Method Description:
    // - CurrentCursorPosition handler for the TSFInputControl that
    //   handles returning current cursor position.
    // Arguments:
    // - eventArgs: event for storing the current cursor position
    // Return Value:
    // - <none>
    void TermControl::_CurrentCursorPositionHandler(const IInspectable& /*sender*/,
                                                    const CursorPositionEventArgs& eventArgs)
    {
        if (!_initializedTerminal)
        {
            // fake it
            eventArgs.CurrentPosition({ 0, 0 });
            return;
        }

        const auto cursorPos = _core.CursorPosition();
        eventArgs.CurrentPosition({ static_cast<float>(cursorPos.X), static_cast<float>(cursorPos.Y) });
    }

    // Method Description:

Review comment (suggestion):
```suggestion
        // SendInput will take care of broadcasting for us.
```

Code after:
        // Convert it to pixels
        const auto scale = SwapChainPanel().CompositionScaleX();
        const til::point relativeToMarginInPixels{
            til::math::flooring,
            relativeToMarginInDIPs.x * scale,
            relativeToMarginInDIPs.y * scale,
        };

        return relativeToMarginInPixels;
    }

    // Method Description:
    // - Composition Completion handler for the TSFInputControl that
    //   handles writing text out to TerminalConnection
    // Arguments:
    // - text: the text to write to TerminalConnection
    // Return Value:
    // - <none>
    void TermControl::_CompositionCompleted(winrt::hstring text)
    {
        if (_IsClosing())
        {
            return;
        }

        // SendInput will take care of broadcasting for us.
        SendInput(text);
    }

    // Method Description:
    // - CurrentCursorPosition handler for the TSFInputControl that
    //   handles returning current cursor position.
    // Arguments:
    // - eventArgs: event for storing the current cursor position
    // Return Value:
    // - <none>
    void TermControl::_CurrentCursorPositionHandler(const IInspectable& /*sender*/,
                                                    const CursorPositionEventArgs& eventArgs)
    {
        if (!_initializedTerminal)
        {
            // fake it
            eventArgs.CurrentPosition({ 0, 0 });
            return;
        }

        const auto cursorPos = _core.CursorPosition();
        eventArgs.CurrentPosition({ static_cast<float>(cursorPos.X), static_cast<float>(cursorPos.Y) });
    }

    // Method Description: