Skip to content

sendInput should be previewable #12861

Closed

Description

See #9818, 60f63b0, #3121. I literally have this prototyped, just need to check it in. It's important for future issues...

Activity

  1. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Apr 8, 2022
  2. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Apr 8, 2022
  3. added
    Area-SettingsIssues related to settings and customizability, for console or terminal
    Issue-TaskIt's a feature request, but it doesn't really need a major design.
    on Apr 8, 2022
  4. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on Apr 8, 2022
  5. added
    Help WantedWe encourage anyone to jump in on these.
    good first issueThis is a fix that might be easier for someone to do as a first contribution
    on Apr 8, 2022
  6. removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Apr 8, 2022
  7. zadjii-msft commented on Apr 29, 2022

    @zadjii-msft
    MemberAuthor

    More cleanly pulled to its own branch: https://github.com/microsoft/terminal/pull/new/dev/migrie/f/12861-preview-input

    Note: You'll also want the backspace trimming thing. That merged into TSFControl in 0f32692 but I don't know where its origin was before that.

        void TSFInputControl::ManuallyDisplayText(const winrt::hstring& text)
        {
            _focused = !text.empty();
            Canvas().Visibility(text.empty() ? Visibility::Collapsed : Visibility::Visible);
    
            _inputBuffer.clear();
            // _editContext.NotifyFocusLeave();
            _activeTextStart = 0;
            _inComposition = false;
    
            // HACK trim off leading DEL chars.
            std::wstring_view view{ text.c_str() };
            const auto strBegin = view.find_first_not_of(L"\x7f");
            if (strBegin != std::wstring::npos)
            {
                view = view.substr(strBegin * 2);
            }
    
            TextBlock().Text(winrt::hstring{ view });
            TextBlock().UpdateLayout();
            TryRedrawCanvas();
        }
  8. 10 remaining items

  9. zadjii-msft commented on Aug 8, 2023

    @zadjii-msft
    MemberAuthor

    Protip, revert 7c3fd2a

    I backed it out because it:

    • worked wacky with wide glyphs / unicode surrogates and the backspacing code
    • the backspacing code was hacky kinda always
    • it didn't always scale and offset to the correct position
    • didn't really handle line wrapping well
    • with the pwsh ghost text, was very confusing

    you may also need 8f0b6f8

  10. added a commit that references this issue on Aug 8, 2023
  11. zadjii-msft commented on Aug 17, 2023

    @zadjii-msft
    MemberAuthor

    Punting out of 1.19. This was wacky as-is. We may want to come back to re-try this with more runway.

  12. added a commit that references this issue on Jun 11, 2024
    86ba986
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area-CmdPalCommand Palette issues and featuresArea-SettingsIssues related to settings and customizability, for console or terminalHelp WantedWe encourage anyone to jump in on these.In-PRThis issue has a related PRIssue-TaskIt's a feature request, but it doesn't really need a major design.Needs-Tag-FixDoesn't match tag requirementsProduct-TerminalThe new Windows Terminal.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions