From nobody Thu Aug 04 14:32:07 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LzB575cB1z4Y06F for ; Thu, 4 Aug 2022 14:32:11 +0000 (UTC) (envelope-from tezeka@hotmail.com) Received: from BRA01-CPZ-obe.outbound.protection.outlook.com (mail-cpzbra01olkn2067.outbound.protection.outlook.com [40.92.97.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LzB566Pcyz3GSc for ; Thu, 4 Aug 2022 14:32:10 +0000 (UTC) (envelope-from tezeka@hotmail.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NUjiEdvRJooiNpEhOB1qce+snD7tmshStLTE8mEr7Yk8p6iODQjlQSzp/67WRiV7CcykBqcSAGZ9GMeIV5XjmqQdbJeCB+lqSP+1vteworv2PhZARaCWfWvV3kW4icfH71M+A2NhcFeM8iI7z4oEk9SnMlpvubtEsBxAngCmSloCNXRRdCyihlmEoFm1YxiRgK1ngktx0BuSAmfzWBIStymdabHkDPI2VAxTik1JKKj3iyCNeyQe2/inOXXrQ06WVwNQQlpQt04iHIYWgBmhNYVNLQxD8+xIrJdIV1XVWV7AcZDvmR1v5ZROjFic6Eekj7g3ICc55QGRYWOy/dnCUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GlAU4YTnqEMkvB8ME0y6HkWMq5bnqa2gG8czjhPeZfI=; b=NZFKEYqmgNchHeBITP07T9kL1llXs9neTYIYXC5b39qEEaDbK/wnSv0+rO4liZP9XMKkVdlXa+JME/R5ODh9KO+r8H6XkeVIofeuLvs7U3U1wmqZgCuOvhvvDJp84ZdrmjgDvelptrtCl0sMiG5hJHvMG0eEIsJ1OwEtcz9KIgJBt+KU8k2eoila5LnVNOL9dKYglWkkDoCmI4IcEU+UKI4eyJknIwO+tSiDWfZK1uw7WS2IqhMUoYd62Mcl+qDaudYc54LJhIuIm5SR3glEJDsp4TM/BitzR6uweiwiE9wyyR8E37CwPXDB7YIfGt9rgAoIEA3MGjVkAhRril7Ylg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GlAU4YTnqEMkvB8ME0y6HkWMq5bnqa2gG8czjhPeZfI=; b=pXto6hKM0YkYyNdhYNqcdC9e+alfEV4BkksZM68negrpOwSXwwG9B/R593/BZkbQacrlvqgH++sHgAR0HM9cNxN4XSUByFlWEusD7VwJc0T/VmzPxzlJHrwiLyKrgGPM/eHDtttPpR8UUT0zfUpYxNU+FPtHYarnCojXUFHMn6XYlLLa8Zdb2SOGMxT1DbCPwEWb5UAaNIEfA/03UldMGloIPDhiXRcqOyRfeLXIHajyw4EnTvk1UvDPmHeAiTtyf1HEFGWmnoAs/wh4YYmhBEySewj++6b3GhdYxMcCp+mISFb3YR2ION2GAN1lqHvzpE+QqDtLYZtzxB9kHL2pIA== Received: from CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM (2603:10d6:103:118::12) by RIZP284MB0987.BRAP284.PROD.OUTLOOK.COM (2603:10d6:10:57::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14; Thu, 4 Aug 2022 14:32:07 +0000 Received: from CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM ([fe80::8423:7f52:935f:65e2]) by CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM ([fe80::8423:7f52:935f:65e2%7]) with mapi id 15.20.5482.016; Thu, 4 Aug 2022 14:32:07 +0000 From: Ivan Quitschal To: Warner Losh , Hans Petter Selasky CC: "freebsd-current@freebsd.org" Subject: RES: vt newcons 3 clicks mouse paste issue FIXED Thread-Topic: vt newcons 3 clicks mouse paste issue FIXED Thread-Index: AQHYpmw1CB+cesrdUEGiwPuu2IoeEK2eyDAAgAADbACAAAOCAA== Date: Thu, 4 Aug 2022 14:32:07 +0000 Message-ID: References: <41ef5c38-515f-739a-cb47-7cab0e609526@selasky.org> <20220623014847.067b18a5ba388639cf6009ce@dec.sakura.ne.jp> In-Reply-To: Accept-Language: pt-BR, en-US Content-Language: pt-BR X-MS-Has-Attach: X-MS-TNEF-Correlator: x-tmn: [+JCB7teG9cozTYlu1VC1x/OxuuzE1cCEURNuG5A1GvEp9usOC3ydsvXf5uOVtBLF] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f15c40ae-6545-4c14-6434-08da76261bb9 x-ms-traffictypediagnostic: RIZP284MB0987:EE_ x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6LmboRYZEIquwi5jAmcHpj+3SU9/UT+pucExJ9o0awaU+LaBSVGEb0ZOwKMuqnSIdIeRo9AhhYbRNVs7HMEEwphj2Mam4XWHDtML3odmcw9cKQFtpIJipJxtX2PX1MID/fnOh2wEXpJWdpvgyKhMgwujd4+vSK+Mmdp9fj3gEfgS0R1liK7pyqTNAgyQXPm7qkMxLP1kaYmEq38a482xsrPE0Ke9yA13ZLRQZiQUqEeWuYpihXvDYo5nbY+6JP34Y1yL0FxNWhA3KNx6kD3LOhEV4HXFymTfJk5UGcP+XujoOd2lzGg+3VjilAXhlyemjIKQIuama7ESZCf5MkeZ1ITukCy0houOLT9uAieyk97Qj9T0NyLIoQ4o29k04ZMsz/2RiMi3K3FbapCNLNCKmO2r00AN1ESF/5/0qVKn+vFfMOkv7iz6XhEACVkCJqw/a4Gv2j29qB4gGe03Qp1DL22JL2JOc5VV/BkvGxqrQ8AVerXYZ595g8OsnxC16ouhEohGivQyEibsVubkrXbW51eDomee6xTnyIeTwMrVq0HlVv77xINf2evyWL0Zvfy7Fq2V7M/YJxBYOJzIPvT1EKiSYo7JeGoo8jrC1BZDSDfwDEp+WD/VjWLts527vGrl x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?j3qAyFAa2K6kKp14vrVqinfs/b1HDELFzsluOCG7IWX9py9LNaf1tOy315?= =?iso-8859-1?Q?OeyCNIo8yAS0FUR0AaA7ntMQqMOM+dq1KQt9ELtmOh/1xGbUK4G4Y/vwnH?= =?iso-8859-1?Q?VCY/dhavp6fcBt1EvRczXP86zj0IYMwubtHcZYjhbdsjDdURZ5rcHf/URw?= =?iso-8859-1?Q?LrxtPirBP6yfWkFTymMC3WTh36DX5e015DHxwq0aEndx1Tp9CBQpjOj6v/?= =?iso-8859-1?Q?x0nPh9pAl38TcUTa+o37OZ7CBKoO2KZTDlyq4yKTG4DmewDtWdlV3lvVe6?= =?iso-8859-1?Q?1LTVsFhFmWEA+daNeytbp3OgxLRbFu1tV0NPJVcUtOMeQOR/8E0cKmBFPk?= =?iso-8859-1?Q?VHPZGAhaB69TR7u3310H6ozzxFiKUmmF/VJ9u9xJU0Xq4sOhu5rFaZ66j1?= =?iso-8859-1?Q?7IR0IeyU13/4QrxSdp6YQ1RfTJI3T9y1sTrXOSTWGeIZ2lKNuE6UXTOdjC?= =?iso-8859-1?Q?ExO4oMqazPx5T1Qo9+U0VHd5L0nsupS0QC+ojL5bk9OH37w6kfRuiUzz0P?= =?iso-8859-1?Q?jv+jlUuTSEHo/vgx43WiCutoB98XOejuhi0kwj86iEXqbdlOU5SXzvN1rT?= =?iso-8859-1?Q?8JZWMXAFPM5VEvXuxtHgdyimycWjeIvT5Uz3PpTAoXuOIliA0fqkXAvI4F?= =?iso-8859-1?Q?jhMIIFWFz4tPW9dZxITJ7CcYbyxB9oV9kFegqmlUYLtR0PYdxqu+/+eqmF?= =?iso-8859-1?Q?99kstiv+1IbhcjkZ6M93oQoQxII/G9YuMWVrtFLPbB7etVlIo60hFDQ9nE?= =?iso-8859-1?Q?drQMRwlKsW54dZZySTON2kIx0kNwNYvLyL1YmkKpR7RYt9vZPPEyld+xMe?= =?iso-8859-1?Q?NegJZlXh/G1pvhvP6c9UqNnLyGRRsc9yiC7zRV4KLGjLZYx3u5mduiaw0S?= =?iso-8859-1?Q?5DRHmNs7NoW6K97ciPvaja5BRj08GkOWnXNIwMKOiIntYCLh+RNAqgoaDI?= =?iso-8859-1?Q?5KTCvx5p5A5Ct8wmVOrgeEYo4AxdiTTrOplUuPg9PUP+CP5QTpGhWWX5hx?= =?iso-8859-1?Q?jeBRBv/RO1/E6YeHO5rgWKcfL6OLJf38IpH9QOMk0YASXPxmcFP7uzHvs1?= =?iso-8859-1?Q?sC28yng2QcKVSswYYRuA01LhAKnHhbZWO6gxR1s0HNv4fUVLg3gy8yJRki?= =?iso-8859-1?Q?j5qNulqjMneSTD4oPMm2KrAgaXPxLniCmnA1RJ/nRCrvGzO71wiJbHj8or?= =?iso-8859-1?Q?lVNVNvY0pnKJF44MdpXRsUQJeQ3ua6KDbqKH55S5l6x7mpjQOcCWSG24JW?= =?iso-8859-1?Q?n2qS1J+nBZUbecL4Ap4n07PFQtQ5xNtrrELDNt8OjAKUeOdCWVw8UfK5Tc?= =?iso-8859-1?Q?oQPFcHdwuZwc7K29Qu3k9Mp6Di81KXzSWBKXH4sIqSqQ8CKGfqAHFPDlAn?= =?iso-8859-1?Q?04x/UChJtD?= Content-Type: multipart/alternative; boundary="_000_CP6P284MB1900CDE6A053535D5CB6C4F8CB9F9CP6P284MB1900BRAP_" List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-7dc52.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: f15c40ae-6545-4c14-6434-08da76261bb9 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Aug 2022 14:32:07.2003 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: RIZP284MB0987 X-Rspamd-Queue-Id: 4LzB566Pcyz3GSc X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hotmail.com header.s=selector1 header.b=pXto6hKM; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=hotmail.com; spf=pass (mx1.freebsd.org: domain of tezeka@hotmail.com designates 40.92.97.67 as permitted sender) smtp.mailfrom=tezeka@hotmail.com X-Spamd-Result: default: False [-2.21 / 15.00]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; URI_COUNT_ODD(1.00)[9]; NEURAL_HAM_SHORT(-0.98)[-0.976]; NEURAL_HAM_LONG(-0.92)[-0.918]; NEURAL_SPAM_MEDIUM(0.68)[0.684]; DMARC_POLICY_ALLOW(-0.50)[hotmail.com,none]; R_SPF_ALLOW(-0.20)[+ip4:40.92.0.0/15]; R_DKIM_ALLOW(-0.20)[hotmail.com:s=selector1]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DWL_DNSWL_NONE(0.00)[hotmail.com:dkim]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[hotmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_IN_DNSWL_NONE(0.00)[40.92.97.67:from]; PHISHED_WHITELISTED(0.00)[freebsd.org->nam12.safelinks.protection.outlook.com]; FREEMAIL_FROM(0.00)[hotmail.com]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:8075, ipnet:40.80.0.0/12, country:US]; RCVD_COUNT_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[hotmail.com:+]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N --_000_CP6P284MB1900CDE6A053535D5CB6C4F8CB9F9CP6P284MB1900BRAP_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thank you Warner Done https://reviews.freebsd.org/D36042 D36042 Just to make clear. I'll put here what I wrote in the comments we have two changes in this patch. first one is regarding the 3 clicks paste. vtbuf_extract_marked() gains a new arg int mark the second change is not much of a change because i had to mess up the "case VT_MOUSE_EXTENDBUTTON:" this change is regarding the highlight mark that doesn't go away from the s= creen after you paste it. the highlight mark stays forever the below solves the problem I've replaced mark =3D VTB_MARK_EXTEND; with mark =3D VTB_MARK_START also included "mark =3D VTB_MARK_START" and removed the return from case VT_MOUSE_PASTEBUTTON: first change is 100% ok (the 3click pasting) second one needs an overlook on where to put this "VTB_MARK_START" without = messing up the switch option "VT_MOUSE_EXTENDBUTTON" thanks --tzk De: Warner Losh Enviada em: quinta-feira, 4 de agosto de 2022 11:12 Para: Ivan Quitschal Cc: Hans Petter Selasky ; freebsd-current@freebsd.org Assunto: Re: vt newcons 3 clicks mouse paste issue FIXED On Thu, Aug 4, 2022 at 8:04 AM Ivan Quitschal > wrote: Hi Hans D36042 created How can I include more patch files in the same defect number? D36042 https://reviews.freebsd.org/D36042 Its missing the vt.h.diff and vt_core.diff Both attached Should i have put all three in the raw patch creation combo box when I was = creating the defect? Sorry my dumbness , never used that phabricator Generate the diff with 'git diff -U99999' to pick up all the changes at onc= e and to give reviewers enough context. Either don't specify any files, or specify all the ones in = the change (depending on the state of your tree). Upload that diff. you can use the web interface= to 'update' the diff to include everything, no need to make a new one. Warner --tzk > -----Mensagem original----- > De: Ivan Quitschal > > Enviada em: ter=E7a-feira, 2 de agosto de 2022 09:34 > Para: Hans Petter Selasky > > Cc: Tomoaki AOKI >; Ivan Quitschal > >; freebsd-current@freebsd.= org; Kurt Jaeger > > > Assunto: vt newcons 3 clicks mouse paste issue FIXED > > > Hi guys > > Currently , if you click 3 times in order to select the entire row, its j= ust not > working as it should. > i fixed that please find below and attached the patches > > With this change now we can do a 3 clicks and paste , i dont know, in som= e > command, and it will be executed just fine, like it was in syscons, and s= till is in > xterm/ linux etc > > now if the event is a 3 mouse clickss select, the space trim is made on t= he right > and an is included > > thanks > > --tzk > > > -------------------- > --- sys/dev/vt/vt_buf.c.orig 2022-08-02 08:44:27.229782000 -0300 > +++ sys/dev/vt/vt_buf.c 2022-08-02 08:45:02.703697000 -0300 > @@ -771,7 +771,7 @@ > } > > void > -vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz) > +vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz, int > +mark) > { > int i, j, r, c, cs, ce; > term_pos_t s, e; > @@ -799,7 +799,7 @@ > buf[i++] =3D vb->vb_rows[r][c]; > > /* For all rows, but the last one. */ > - if (r !=3D e.tp_row) { > + if (r !=3D e.tp_row || mark =3D=3D VTB_MARK_ROW) { > /* Trim trailing word separators, if any. */ > for (; i !=3D j; i--) { > if (!tchar_is_word_separator(buf[i - 1])= ) > -------------------- > > --- sys/dev/vt/vt_core.c.orig 2022-08-02 08:43:15.436415000 -0300 > +++ sys/dev/vt/vt_core.c 2022-08-02 08:43:49.120096000 -0300 > @@ -2287,7 +2287,7 @@ > VD_PASTEBUFSZ(vd) =3D len; > } > /* Request copy/paste buffer data, no more than `len' */ > - vtbuf_extract_marked(&vw->vw_buf, VD_PASTEBUF(vd), len); > + vtbuf_extract_marked(&vw->vw_buf, VD_PASTEBUF(vd), len, > + mark); > > VD_PASTEBUFLEN(vd) =3D len; > > --------------------- > > --- sys/dev/vt/vt.h.orig 2022-08-02 08:41:23.888584000 -0300 > +++ sys/dev/vt/vt.h 2022-08-02 08:41:54.504309000 -0300 > @@ -238,7 +238,7 @@ > #ifndef SC_NO_CUTPASTE > int vtbuf_set_mark(struct vt_buf *vb, int type, int col, int row); > int vtbuf_get_marked_len(struct vt_buf *vb); -void > vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz); > +void vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz, > +int > mark); > #endif > > #define VTB_MARK_NONE 0 > -------------------------- --_000_CP6P284MB1900CDE6A053535D5CB6C4F8CB9F9CP6P284MB1900BRAP_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Thank you= Warner

&nbs= p;

Done=

&nbs= p;

https://reviews.freebsd.org/D36042<= /a>

D36042

 

Just to make clear. I’ll = put here what I wrote in the comments

 

we have two changes in this patch.<= /span>

first one is regarding the 3 clicks paste.
vtbuf_extract_marked() gains a new arg
int mark

the second change is not much of a change beca= use i had to mess up the
“case VT_MOUSE_EXTENDBUTTON:”

this change is regarding the highlight mark th= at doesn’t go away from the screen after you paste it. the highlight = mark stays forever
the below solves the problem

I’ve replaced
mark =3D VTB_MARK_EXTEND;
with
mark =3D VTB_MARK_START

 

also included  “mark =3D VTB_MARK_START” and removed the return from

     &= nbsp;         case VT_MOUSE_PASTEBU= TTON:

 

first change is 100% ok (the 3click pasting)

second one needs an overlook on where to put this “VTB_MARK_START” without messing up the switch option “VT_MOUSE_EXTENDBUTTON”

 

thanks

 

--tzk=

 

 

De: Warner Losh <imp@bsdimp.com>
Enviada em: quinta-feira, 4 de agosto de 2022 11:12
Para: Ivan Quitschal <tezeka@hotmail.com>
Cc: Hans Petter Selasky <hps@selasky.org>; freebsd-current@fre= ebsd.org
Assunto: Re: vt newcons 3 clicks mouse paste issue FIXED<= /p>

 

 

 

Hi Hans

D36042 created
How can I include more patch files in the same defect number? D36042
https://reviews.fre= ebsd.org/D36042

Its missing the vt.h.diff and vt_core.diff
Both attached

Should i have put all three in the raw patch creation combo box when I was = creating the defect?
Sorry my dumbness  , never used that phabricator

 

Generate the diff with 'git diff -U99999' to pick up= all the changes at once and to give reviewers

enough context. Either don't specify any files, or s= pecify all the ones in the change (depending

on the state of your tree). Upload that diff. you ca= n use the web interface to 'update' the diff to

include everything, no need to make a new one.<= /o:p>

 

Warner

 

--tzk





> -----Mensagem original-----
> De: Ivan Quitschal <tezeka@hotmail.com>
> Enviada em: ter=E7a-feira, 2 de agosto de 2022 09:34
> Para: Hans Petter Selasky <hps@selasky.org>
> Cc: Tomoaki AOKI <junchoon@dec.sakura.ne.jp>; Ivan Quitschal
> <tezeka@hot= mail.com>; freebsd-current@freebsd.org; Kurt Jaeger
> <pi@freebsd.org= >
> Assunto: vt newcons 3 clicks mouse paste issue FIXED
>
>
> Hi guys
>
> Currently , if you click 3 times in order to select the entire row, it= s just not
> working as it should.
> i fixed that please find below and attached the patches
>
> With this change now we can do a 3 clicks and paste , i dont know, in = some
> command, and it will be executed just fine, like it was in syscons, an= d still is in
> xterm/ linux etc
>
> now if the event is a 3 mouse clickss select, the space trim is made o= n the right
> and an <enter> is included
>
> thanks
>
> --tzk
>
>
> --------------------
> --- sys/dev/vt/vt_buf.c.orig    2022-08-02 08:44:27.22978200= 0 -0300
> +++ sys/dev/vt/vt_buf.c 2022-08-02 08:45:02.703697000 -0300
> @@ -771,7 +771,7 @@
>   }
>
>   void
> -vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz)
> +vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz, int=
> +mark)
>   {
>          int i, j, r, c, cs, ce;
>          term_pos_t s, e;
> @@ -799,7 +799,7 @@
>                    &= nbsp;     buf[i++] =3D vb->vb_rows[r][c];
>
>                  /* For a= ll rows, but the last one. */
> -               if (r !=3D e.t= p_row) {
> +               if (r !=3D e.t= p_row || mark =3D=3D VTB_MARK_ROW) {
>                    &= nbsp;     /* Trim trailing word separators, if any. */
>                    &= nbsp;     for (; i !=3D j; i--) {
>                    &= nbsp;             if (!tchar_is_word_separato= r(buf[i - 1]))
> --------------------
>
> --- sys/dev/vt/vt_core.c.orig   2022-08-02 08:43:15.43641500= 0 -0300
> +++ sys/dev/vt/vt_core.c        2022-08-02 08:43:4= 9.120096000 -0300
> @@ -2287,7 +2287,7 @@
>                    &= nbsp;     VD_PASTEBUFSZ(vd) =3D len;
>                  }
>                  /* Reque= st copy/paste buffer data, no more than `len' */
> -               vtbuf_extract_= marked(&vw->vw_buf, VD_PASTEBUF(vd), len);
> +               vtbuf_extract_= marked(&vw->vw_buf, VD_PASTEBUF(vd), len,
> + mark);
>
>                  VD_PASTE= BUFLEN(vd) =3D len;
>
> ---------------------
>
> --- sys/dev/vt/vt.h.orig        2022-08-02 08:41:2= 3.888584000 -0300
> +++ sys/dev/vt/vt.h     2022-08-02 08:41:54.504309000 -= 0300
> @@ -238,7 +238,7 @@
>   #ifndef SC_NO_CUTPASTE
>   int vtbuf_set_mark(struct vt_buf *vb, int type, int col, i= nt row);
>   int vtbuf_get_marked_len(struct vt_buf *vb); -void
> vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz);
> +void vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz= ,
> +int
> mark);
>   #endif
>
>   #define        VTB_MARK_NONE  &nb= sp;        0
> --------------------------

--_000_CP6P284MB1900CDE6A053535D5CB6C4F8CB9F9CP6P284MB1900BRAP_--