Bug 260963 - sc/vt console: mouse paste incorrectly adds newlines
Summary: sc/vt console: mouse paste incorrectly adds newlines
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-05 20:58 UTC by Stefan B.
Modified: 2022-04-06 17:29 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan B. 2022-01-05 20:58:12 UTC
In the freebsd-hackers mailing list there was recently a discussion about bugs of vt.
At least another guy mentioned one of the most annoying vt bugs, so I think there is proof am not the only one who uses sc because of things like this issue:


Problem:
If one marks a line that goes across more than one screen line, vt *always* inserts a newline at each physical screen line end of the copy source.
This is highly annoying, as it is impossible to copy/paste in one piece, say, a command line.

Expected result:
The copied text gets pasted without newlines being inserted.
Comment 1 Ed Maste freebsd_committer freebsd_triage 2022-01-06 20:17:45 UTC
> If one marks a line that goes across more than one screen line, vt *always*
> inserts a newline at each physical screen line end of the copy source.

I just booted an old image I had around (12.0-CURRENT r327524) in QEMU, and sc behaves the same way.

This would be good to address nonetheless.
Comment 2 Ed Maste freebsd_committer freebsd_triage 2022-01-06 20:25:46 UTC
I cannot find the referenced report on hackers - could you please add a link to the mailing list archive? I want to make sure I'm correctly trying to reproduce the differing behaviour between sc and vt.
Comment 3 Stefan B. 2022-01-18 15:51:23 UTC
The link:
https://lists.freebsd.org/archives/freebsd-hackers/2021-November/000498.html

I re-verified and notice that on 13, sc indeed adds newlines at EOL, which should not be done.
Maybe I confused this with x terminal emulators, which behave well in this regard.

Anyway I agree with you that it would make sense to adapt the console behavior so it resembles the behavior one is accustomed with X terminal emulators.