Skip to content

Pasting with the terminal's own paste goes in as one paste #446

Description

@a-team-app

Context

When you paste with the terminal's own paste (Cmd+V in most macOS terminals, right-click, middle-click), the text arrives as typed keys: each newline goes through auto-indent, and a long paste becomes many undo steps. Terminal.Gui 2.4+ turns on bracketed paste and raises a Paste event with the whole block. This task puts that block through the same paste Ctrl+V uses. Needs #442, which moves TuiCode to Terminal.Gui 2.5. Part of #40.

Acceptance criteria

  • Pasting an indented block with the terminal's paste keeps its indentation exactly: no extra indent added to each line.
  • One Ctrl+Z removes the whole paste.
  • With several carets, a terminal paste goes in at every caret the way Ctrl+V does today.
  • Pasting over a selection replaces it.
  • Over SSH, the terminal's paste brings the laptop's clipboard into the remote TuiCode.
  • Pasting into the Find field or another text field inserts the text there.
  • Typing, including auto-indent on Enter, works as before.

Tests

  • A paste event with multi-line, indented, CRLF and tab text inserts it verbatim, as one undo step.
  • Multi-caret and replace-selection paths share Ctrl+V's behaviour.
  • Paste routed to the focused view: editor, Find field, a dialog's text field.

Out of scope

Activity

  1. a-team-app commented on Oct 6, 2026

    @a-team-app
    ContributorAuthor

    Blocked by #442: Terminal paste needs Terminal.Gui 2.5, which #442 brings in on its own.

  2. a-team-app commented on Oct 8, 2026

    @a-team-app
    ContributorAuthor

    Draft PR #480 is up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-team:devClaimed by the a-team Dev

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions