Bug 263083

Summary: vt newcons: Paste fails to paste full marked section, only pastes part of it
Product: Base System Reporter: Stefan B. <sblachmann>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Some People CC: emaste, sblachmann
Priority: --- Keywords: vt
Version: Unspecified   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263084

Description Stefan B. 2022-04-06 11:38:31 UTC
System: FreeBSD 13.0-RELEASE-p8 on amd64

When I used vi in one console, and less-ed a configuration file in another one to merge sections into the first config file I was editing with vi, I noticed another annoying vt newcons bug that I never encoutered on good old SC.

When marking multiple lines with the mouse, changing to another console, then only the first few (4-10) lines of the marked section gets pasted.

This is quite annoying as one needs to repeat marking the not-pasted part, paste, mark again, etc, until the complete section has been pasted.


I sincerely apologize for pestering you vt newcons developers with bug reports.
In the past I avoided using vt newcons because it was no fun to me due to the many bugs.
But now I am going to make more use of my laptop which has Intel graphics, and so I am forced to use vt newcons for suspend/resume...
Thus I hope you can understand and are not annoyed by my bug reports on vt newcons.
Comment 1 Ed Maste freebsd_committer freebsd_triage 2022-04-06 15:57:44 UTC
Can you confirm that this also happens without the console switch? AFAICT the issue is just that the copy buffer has a limited, too-small size.
Comment 2 Stefan B. 2022-04-06 22:52:09 UTC
I also thought of too-small buffer size first.
But considering that apparently the whole lines are being buffered (and not the actual text, see also PR 263084) and the number of lines being pasted varies from 4-10, even if the actual text contained is quite small, made me wonder whether this is the cause.

The screen resolution is FHD, so lines are a bit longer than 80 chars (using default font). The "traditional paste buffer size" is probably at least 2k chars, and should probably able to carry a bit more than 4-10 lines only.

Maybe the copypaste buffer should be resized when console gets larger than previous X/Y dimensions at drm-kmod loading and/or font switching?

Will check the behavior without console switch the next days. Laptop is stashed in the flight luggage now and it might take a bit until I got wifi internet access working.
Comment 3 Ed Maste freebsd_committer freebsd_triage 2022-04-06 23:02:56 UTC
I was able to reproduce, and the # of lines copied in my case is related to the console size -- when I switched to a double-size font (so half the number of columns) about twice as many lines copied.