Trim all whitespace from end of line, except for last line and
only use '\r' to terminate the pasted lines as expected by TTY.
Submitted by: Ivan Quitschal <tezeka@hotmail.com>
MFC after: 1 week
Sponsored by: NVIDIA Networking
Differential D35552 Authored by • hselasky on Jun 22 2022, 4:40 PM.
Details Summary Trim all whitespace from end of line, except for last line and Submitted by: Ivan Quitschal <tezeka@hotmail.com>
Diff Detail
Event TimelineHerald added a subscriber: imp. · View Herald TranscriptJun 22 2022, 4:40 PM2022-06-22 16:40:38 (UTC+0) Comment Actions Make sure to zero-fill the remainder of the paste buffer, which will be skipped during paste. Comment Actions Fix some bugs.
• hselasky edited the summary of this revision. (Show Details)Jun 23 2022, 7:16 PM2022-06-23 19:16:16 (UTC+0) • hselasky edited the summary of this revision. (Show Details)Jun 23 2022, 7:45 PM2022-06-23 19:45:27 (UTC+0) Comment Actions
Worked "almost" as expected. *No unneeded '\0' pasted. *Proper newline. *Pasted wanted last-line trailing space. *But unfortunately, IDEOGRAPHIC (Full-width) SPACE (E38080, U+3000) seems to be treated as regular character, not as space. Anyway, thanks in advance! Comment Actions Updated patch with support for more unicode word separators. Patches will be split before commit. This revision is now accepted and ready to land.Jun 25 2022, 9:30 AM2022-06-25 09:30:57 (UTC+0) Comment Actions
Thanks! *Trailing spaces only listed in switch() of tchar_is_word_separator() are deleted on non-last lines. *Space (tried U+3000 only, though) before U+2007, which is not listed and untouched, on non-last line is sanely kept. If any others having objection to handled spaces pop in, only the switch() part is needed to be re-considererd. Closed by commit rG5fe0a82501cb: vt: Fix contents of paste buffer for newcons. (authored by • hselasky). · Explain WhyJun 27 2022, 8:18 AM2022-06-27 08:18:34 (UTC+0) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 107324 sys/dev/vt/vt_buf.c
sys/dev/vt/vt_core.c
|