Skip to content

Code block copying introduces unwanted spaces/line breaks #2896

Open

Description

@theshanelynch

Description

When copying long single-line text (e.g. a regex pattern) from a code block in the Superset terminal, the copied text includes unwanted spaces or line breaks where the terminal visually wraps the line.

Steps to reproduce

  1. Have a long single-line string displayed in a code block in the terminal (e.g. a regex pattern)
  2. Select and copy the text from the code block
  3. Paste it into an external application

Expected behavior

The copied text should be the original single-line string with no extra whitespace introduced.

Actual behavior

The pasted text contains spaces or newlines at the points where the terminal wrapped the line for display, making the copied text unusable without manual cleanup.

Workaround

Writing the text to a file and copying from there, or piping to pbcopy via the shell.

Activity

  1. added a commit that references this issue on Mar 26, 2026
  2. Kitenite commented on Jul 11, 2026

    @Kitenite
    Member

    Closing as part of the July 2026 stale-issue sweep (no activity since 2026-06-01). If this still reproduces or is still wanted on a current build, please comment and we'll reopen.

  3. nrutman commented on Sep 21, 2026

    @nrutman
    Contributor

    Still reproduces in Superset 1.30.0 on macOS arm64. Selecting multiple terminal lines with Cmd+C adds substantial trailing whitespace to each pasted line. This also occurs with ordinary multiline output, not only visually wrapped long lines.

    Expected: terminal-added right padding is omitted while intentional whitespace remains preserved. Could this be reopened?

  4. nrutman commented on Sep 21, 2026

    @nrutman
    Contributor

    @Kitenite can we re-open this so it gets fixed?

  5. Kitenite commented on Sep 21, 2026

    @Kitenite
    Member

    Hello yes reopened :)

  6. nrutman commented on Sep 21, 2026

    @nrutman
    Contributor

    Thank you! And I think my PR (#7709) solves the issue. I loaded the local app off of that branch and the copy/paste was clean! 🎉

  7. Kitenite commented on Sep 21, 2026

    @Kitenite
    Member

    taking a look, thank you!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions