Bug: Copying multi-line colored text from SSH terminal drops whitespace characters

Bug: Copying multi-line colored text from SSH terminal drops whitespace characters

avatar

Hello,
I would like to report a bug regarding the copy and paste behavior in the SSH terminal session. When copying multiple lines of output that contain colored text, some whitespace characters are dropped upon pasting.
This issue seems to be directly related to the handling of ANSI color escape sequences during multi-line selection.

Environment:

  • RDM Version: 2026.2.7.0 64-bit (PreJIT)
  • Client OS: Windows 11 Pro 24H2 (OS Build 26100.8457)
  • Server OS: Oracle Linux 9 (Kernel 5.15.0-315.196.5.2.el9uek.x86_64)
  • Session Type: SSH Shell

Issue Description & Actual Behavior:
When I execute a command that outputs colored text (e.g., ip route) and copy the multi-line result, the spaces surrounding the colored elements are missing when pasted.
Here is the exact pasted result of the multi-line copy (spaces are missing):

[usr01@xxxx00 ~]$ ip route
default via10.10.1.1devenp0s5proto dhcp src10.10.1.250metric 100
10.10.1.0/24devenp0s5proto kernel scope link src10.10.1.250metric 100
169.254.0.0/16devenp0s5proto dhcp scope link src10.10.1.250metric 100
[usr01@xxxx00 ~]$


And here is the actual terminal display showing the commands being executed (please see the attached image for color reference):
2026-06-12_11h28_12.png
Expected Behavior (and Workarounds):
The spaces should be preserved. I found that the issue does not occur in the following scenarios:

1. When piping the output to cat (which removes ANSI colors):
Copying the multi-line result of ip route | cat works perfectly (as shown in the bottom half of the image).

[usr01@xxxx00 ~]$ ip route | cat
default via 10.10.1.1 dev enp0s5 proto dhcp src 10.10.1.250 metric 100
10.10.1.0/24 dev enp0s5 proto kernel scope link src 10.10.1.250 metric 100
169.254.0.0/16 dev enp0s5 proto dhcp scope link src 10.10.1.250 metric 100
[usr01@xxxx00 ~]$


2. When copying a single line (without line breaks):
Selecting and copying just one colored line preserves the spaces.

10.10.1.0/24 dev enp0s5 proto kernel scope link src 10.10.1.250 metric 100


Could you please investigate this issue with ANSI color handling during multi-line copy?

Thank you.

2026-06-12_11h28_12.png

All Comments (0)

Sysadminotaur pondering a question Special Q&A

Our CTO is answering your AI questions

A rare opportunity — ask our CTO directly.

10 questions already asked Ends in 4 days
Ask your question →