Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • xfce4-terminal xfce4-terminal
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 89
    • Issues 89
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Apps
  • xfce4-terminalxfce4-terminal
  • Issues
  • #154

Closed
Open
Created Dec 22, 2021 by Adam Katz@adamhotep

More options for pasting multi-line text

The new options for Potentially Unsafe Paste warnings are great. I'd like control over the text's line breaks.

Currently:
image

If the text box were read-only, I'd propose radio buttons:
image

This adds radio buttons (which only require one click rather than a drop-down menu's two clicks) for how to treat line breaks: Preserve them, convert them to spaces, or remove them. Clicking a radio button would immediately convert the text in the white preview box.

However, this text box is editable (🤩 I just figured that out), so I'm actually proposing some buttons:
image

The three buttons would do:

  • Collapse spacing: all space characters would be consolidated, so a b\nc d would be a b c d (as a regex: s/[\s\r\n]+/ /g)
  • Lines → Spaces: all line break characters would become spaces, so a\r\nb\nc d would be a b c d (as a regex: s/\r?\n|\r/ /g)
  • Remove linebreaks: all line break characters would be removed, so a\r\nb\nc d would be abc d (as a regex: s/[\r\n]+//g)

I don't feel like doctoring another image, but another option would be to have a heading (like my first mockup with radio buttons) for "Spacing:" and then buttons for Collapse and Lines → Spaces and No lines

The bottom row could also contain ⮢ Undo & ⮣ Redo and/or Reset buttons, but that's overkill—this isn't meant to be a power editor and the user can just hit Cancel and paste anew.

Assignee
Assign to
Time tracking