Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Aug 2022 14:32:07 +0000
From:      Ivan Quitschal <tezeka@hotmail.com>
To:        Warner Losh <imp@bsdimp.com>, Hans Petter Selasky <hps@selasky.org>
Cc:        "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   RES: vt newcons 3 clicks mouse paste issue FIXED
Message-ID:  <CP6P284MB1900CDE6A053535D5CB6C4F8CB9F9@CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM>
In-Reply-To: <CANCZdfpMGCBco%2BgDhqAPr%2BrnQauNshaUv3H8wF8z2fmHFtySbg@mail.gmail.com>
References:  <CP6P284MB1900CA1ED5B5BADE054ECB34CBB29@CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM> <f6c1ee1c-bdd9-c8d6-1385-145022e6765d@selasky.org> <CP6P284MB1900CC7B7F6343DAB1D1E5BCCBB29@CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM> <41ef5c38-515f-739a-cb47-7cab0e609526@selasky.org> <CP6P284MB1900DD3D6F41CBAF38CF2CA4CBB29@CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM> <20220623014847.067b18a5ba388639cf6009ce@dec.sakura.ne.jp> <fd0f9de9-98ac-87b4-2c9d-5fdc27bdb3c4@selasky.org> <CP6P284MB1900DD45138428B4612DF7ACCB9D9@CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM> <CP6P284MB190086D2AD26A14E0C5DA002CB9F9@CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM> <CANCZdfpMGCBco%2BgDhqAPr%2BrnQauNshaUv3H8wF8z2fmHFtySbg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--_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 <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@freebsd.org
Assunto: Re: vt newcons 3 clicks mouse paste issue FIXED



On Thu, Aug 4, 2022 at 8:04 AM Ivan Quitschal <tezeka@hotmail.com<mailto:te=
zeka@hotmail.com>> wrote:
Hi Hans

D36042 created
How can I include more patch files in the same defect number? D36042
https://reviews.freebsd.org/D36042<https://nam12.safelinks.protection.outlo=
ok.com/?url=3Dhttps%3A%2F%2Freviews.freebsd.org%2FD36042&data=3D05%7C01%7C%=
7Cae9c4e72021942fc626908da76236453%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7=
C0%7C637952191654414206%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjo=
iV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3D3sVOGwTYeCM=
1YjjLv8ta6DzDD6kBAehqnJWvn2dKSec%3D&reserved=3D0>

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 <tezeka@hotmail.com<mailto:tezeka@hotmail.com>>
> Enviada em: ter=E7a-feira, 2 de agosto de 2022 09:34
> Para: Hans Petter Selasky <hps@selasky.org<mailto:hps@selasky.org>>
> Cc: Tomoaki AOKI <junchoon@dec.sakura.ne.jp<mailto:junchoon@dec.sakura.ne=
.jp>>; Ivan Quitschal
> <tezeka@hotmail.com<mailto:tezeka@hotmail.com>>; freebsd-current@freebsd.=
org<mailto:freebsd-current@freebsd.org>; Kurt Jaeger
> <pi@freebsd.org<mailto: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, 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 <enter> 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

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:"Segoe UI";
	panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
span.EstiloDeEmail18
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"PT-BR" link=3D"blue" vlink=3D"purple" style=3D"word-wrap:brea=
k-word">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US">Thank you=
 Warner<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US"><o:p>&nbs=
p;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US">Done<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US"><o:p>&nbs=
p;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US"><a href=
=3D"https://reviews.freebsd.org/D36042">https://reviews.freebsd.org/D36042<=
/a><o:p></o:p></span></p>
<p class=3D"MsoNormal">D36042<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Just to make clear. I&#8217;ll =
put here what I wrote in the comments<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p style=3D"mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.0pt;mar=
gin-left:0cm;background:white">
<span lang=3D"EN-US" style=3D"font-size:10.0pt;font-family:&quot;Segoe UI&q=
uot;,sans-serif;color:black">we have two changes in this patch.<o:p></o:p><=
/span></p>
<p style=3D"mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.0pt;mar=
gin-left:0cm;background:white;font-variant-ligatures: normal;font-variant-c=
aps: normal;orphans: 2;widows: 2;-webkit-text-stroke-width: 0px;text-decora=
tion-thickness: initial;text-decoration-style: initial;text-decoration-colo=
r: initial;word-spacing:0px">
<span lang=3D"EN-US" style=3D"font-size:10.0pt;font-family:&quot;Segoe UI&q=
uot;,sans-serif;color:black">first one is regarding the 3 clicks paste.<br>
vtbuf_extract_marked() gains a new arg<br>
int mark<o:p></o:p></span></p>
<p style=3D"mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.0pt;mar=
gin-left:0cm;background:white;font-variant-ligatures: normal;font-variant-c=
aps: normal;orphans: 2;widows: 2;-webkit-text-stroke-width: 0px;text-decora=
tion-thickness: initial;text-decoration-style: initial;text-decoration-colo=
r: initial;word-spacing:0px">
<span lang=3D"EN-US" style=3D"font-size:10.0pt;font-family:&quot;Segoe UI&q=
uot;,sans-serif;color:black">the second change is not much of a change beca=
use i had to mess up the<br>
&#8220;case VT_MOUSE_EXTENDBUTTON:&#8221;<o:p></o:p></span></p>
<p style=3D"mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.0pt;mar=
gin-left:0cm;background:white;font-variant-ligatures: normal;font-variant-c=
aps: normal;orphans: 2;widows: 2;-webkit-text-stroke-width: 0px;text-decora=
tion-thickness: initial;text-decoration-style: initial;text-decoration-colo=
r: initial;word-spacing:0px">
<span lang=3D"EN-US" style=3D"font-size:10.0pt;font-family:&quot;Segoe UI&q=
uot;,sans-serif;color:black">this change is regarding the highlight mark th=
at doesn&#8217;t go away from the screen after you paste it. the highlight =
mark stays forever<br>
the below solves the problem<o:p></o:p></span></p>
<p style=3D"margin:0cm;background:white;font-variant-ligatures: normal;font=
-variant-caps: normal;orphans: 2;widows: 2;-webkit-text-stroke-width: 0px;t=
ext-decoration-thickness: initial;text-decoration-style: initial;text-decor=
ation-color: initial;word-spacing:0px">
<span lang=3D"EN-US" style=3D"font-size:10.0pt;font-family:&quot;Segoe UI&q=
uot;,sans-serif;color:black">I&#8217;ve replaced<br>
mark =3D VTB_MARK_EXTEND;<br>
with<br>
mark =3D VTB_MARK_START<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">also included &nbsp;</span><spa=
n lang=3D"EN-US" style=3D"font-size:10.0pt;font-family:&quot;Segoe UI&quot;=
,sans-serif;color:black">&#8220;mark =3D VTB_MARK_START&#8221;
</span><span lang=3D"EN-US">and removed the return from </span><span lang=
=3D"EN-US" style=3D"font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-=
serif;color:black"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case VT_MOUSE_PASTEBU=
TTON:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"mso-fareast-language:E=
N-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"mso-fareast-language:E=
N-US">first change is 100% ok (the 3click pasting)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"mso-fareast-language:E=
N-US">second one needs an overlook on where to put this &#8220;</span><span=
 lang=3D"EN-US" style=3D"font-size:10.0pt;font-family:&quot;Segoe UI&quot;,=
sans-serif;color:black">VTB_MARK_START&#8221; without messing up
 the switch option &#8220;VT_MOUSE_EXTENDBUTTON&#8221;<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt;font-=
family:&quot;Segoe UI&quot;,sans-serif;color:black"><o:p>&nbsp;</o:p></span=
></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt;font-=
family:&quot;Segoe UI&quot;,sans-serif;color:black">thanks<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt;font-=
family:&quot;Segoe UI&quot;,sans-serif;color:black"><o:p>&nbsp;</o:p></span=
></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt;font-=
family:&quot;Segoe UI&quot;,sans-serif;color:black">--tzk<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"mso-fareast-language:E=
N-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"mso-fareast-language:E=
N-US"><o:p>&nbsp;</o:p></span></p>
<div style=3D"border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm =
4.0pt">
<div>
<div style=3D"border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm =
0cm 0cm">
<p class=3D"MsoNormal"><b>De:</b> Warner Losh &lt;imp@bsdimp.com&gt; <br>
<b>Enviada em:</b> quinta-feira, 4 de agosto de 2022 11:12<br>
<b>Para:</b> Ivan Quitschal &lt;tezeka@hotmail.com&gt;<br>
<b>Cc:</b> Hans Petter Selasky &lt;hps@selasky.org&gt;; freebsd-current@fre=
ebsd.org<br>
<b>Assunto:</b> Re: vt newcons 3 clicks mouse paste issue FIXED<o:p></o:p><=
/p>
</div>
</div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<p class=3D"MsoNormal">On Thu, Aug 4, 2022 at 8:04 AM Ivan Quitschal &lt;<a=
 href=3D"mailto:tezeka@hotmail.com">tezeka@hotmail.com</a>&gt; wrote:<o:p><=
/o:p></p>
</div>
<blockquote style=3D"border:none;border-left:solid #CCCCCC 1.0pt;padding:0c=
m 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class=3D"MsoNormal">Hi Hans<br>
<br>
D36042 created<br>
How can I include more patch files in the same defect number? D36042<br>
<a href=3D"https://nam12.safelinks.protection.outlook.com/?url=3Dhttps%3A%2=
F%2Freviews.freebsd.org%2FD36042&amp;data=3D05%7C01%7C%7Cae9c4e72021942fc62=
6908da76236453%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637952191654414=
206%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1=
haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=3D3sVOGwTYeCM1YjjLv8ta6DzDD6k=
BAehqnJWvn2dKSec%3D&amp;reserved=3D0" target=3D"_blank">https://reviews.fre=
ebsd.org/D36042</a><br>
<br>
Its missing the vt.h.diff and vt_core.diff<br>
Both attached<br>
<br>
Should i have put all three in the raw patch creation combo box when I was =
creating the defect?<br>
Sorry my dumbness&nbsp; , never used that phabricator<o:p></o:p></p>
</blockquote>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Generate the diff with 'git diff -U99999' to pick up=
 all the changes at once and to give reviewers<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">enough context. Either don't specify any files, or s=
pecify all the ones in the change (depending<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">on the state of your tree). Upload that diff. you ca=
n use the web interface to 'update' the diff to<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">include everything, no need to make a new one.<o:p><=
/o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Warner<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp;<o:p></o:p></p>
</div>
<blockquote style=3D"border:none;border-left:solid #CCCCCC 1.0pt;padding:0c=
m 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class=3D"MsoNormal">--tzk<br>
<br>
<br>
<br>
<br>
<br>
&gt; -----Mensagem original-----<br>
&gt; De: Ivan Quitschal &lt;<a href=3D"mailto:tezeka@hotmail.com" target=3D=
"_blank">tezeka@hotmail.com</a>&gt;<br>
&gt; Enviada em: ter=E7a-feira, 2 de agosto de 2022 09:34<br>
&gt; Para: Hans Petter Selasky &lt;<a href=3D"mailto:hps@selasky.org" targe=
t=3D"_blank">hps@selasky.org</a>&gt;<br>
&gt; Cc: Tomoaki AOKI &lt;<a href=3D"mailto:junchoon@dec.sakura.ne.jp" targ=
et=3D"_blank">junchoon@dec.sakura.ne.jp</a>&gt;; Ivan Quitschal<br>
&gt; &lt;<a href=3D"mailto:tezeka@hotmail.com" target=3D"_blank">tezeka@hot=
mail.com</a>&gt;; <a href=3D"mailto:freebsd-current@freebsd.org" target=3D"=
_blank">
freebsd-current@freebsd.org</a>; Kurt Jaeger<br>
&gt; &lt;<a href=3D"mailto:pi@freebsd.org" target=3D"_blank">pi@freebsd.org=
</a>&gt;<br>
&gt; Assunto: vt newcons 3 clicks mouse paste issue FIXED<br>
&gt; <br>
&gt; <br>
&gt; Hi guys<br>
&gt; <br>
&gt; Currently , if you click 3 times in order to select the entire row, it=
s just not<br>
&gt; working as it should.<br>
&gt; i fixed that please find below and attached the patches<br>
&gt; <br>
&gt; With this change now we can do a 3 clicks and paste , i dont know, in =
some<br>
&gt; command, and it will be executed just fine, like it was in syscons, an=
d still is in<br>
&gt; xterm/ linux etc<br>
&gt; <br>
&gt; now if the event is a 3 mouse clickss select, the space trim is made o=
n the right<br>
&gt; and an &lt;enter&gt; is included<br>
&gt; <br>
&gt; thanks<br>
&gt; <br>
&gt; --tzk<br>
&gt; <br>
&gt; <br>
&gt; --------------------<br>
&gt; --- sys/dev/vt/vt_buf.c.orig&nbsp; &nbsp; 2022-08-02 08:44:27.22978200=
0 -0300<br>
&gt; +++ sys/dev/vt/vt_buf.c 2022-08-02 08:45:02.703697000 -0300<br>
&gt; @@ -771,7 +771,7 @@<br>
&gt;&nbsp; &nbsp;}<br>
&gt; <br>
&gt;&nbsp; &nbsp;void<br>
&gt; -vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz)<br>
&gt; +vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz, int=
<br>
&gt; +mark)<br>
&gt;&nbsp; &nbsp;{<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int i, j, r, c, cs, ce;<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; term_pos_t s, e;<br>
&gt; @@ -799,7 +799,7 @@<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; buf[i++] =3D vb-&gt;vb_rows[r][c];<br>
&gt; <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* For a=
ll rows, but the last one. */<br>
&gt; -&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (r !=3D e.t=
p_row) {<br>
&gt; +&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (r !=3D e.t=
p_row || mark =3D=3D VTB_MARK_ROW) {<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; /* Trim trailing word separators, if any. */<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; for (; i !=3D j; i--) {<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!tchar_is_word_separato=
r(buf[i - 1]))<br>
&gt; --------------------<br>
&gt; <br>
&gt; --- sys/dev/vt/vt_core.c.orig&nbsp; &nbsp;2022-08-02 08:43:15.43641500=
0 -0300<br>
&gt; +++ sys/dev/vt/vt_core.c&nbsp; &nbsp; &nbsp; &nbsp; 2022-08-02 08:43:4=
9.120096000 -0300<br>
&gt; @@ -2287,7 +2287,7 @@<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; VD_PASTEBUFSZ(vd) =3D len;<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* Reque=
st copy/paste buffer data, no more than `len' */<br>
&gt; -&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;vtbuf_extract_=
marked(&amp;vw-&gt;vw_buf, VD_PASTEBUF(vd), len);<br>
&gt; +&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;vtbuf_extract_=
marked(&amp;vw-&gt;vw_buf, VD_PASTEBUF(vd), len,<br>
&gt; + mark);<br>
&gt; <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VD_PASTE=
BUFLEN(vd) =3D len;<br>
&gt; <br>
&gt; ---------------------<br>
&gt; <br>
&gt; --- sys/dev/vt/vt.h.orig&nbsp; &nbsp; &nbsp; &nbsp; 2022-08-02 08:41:2=
3.888584000 -0300<br>
&gt; +++ sys/dev/vt/vt.h&nbsp; &nbsp; &nbsp;2022-08-02 08:41:54.504309000 -=
0300<br>
&gt; @@ -238,7 +238,7 @@<br>
&gt;&nbsp; &nbsp;#ifndef SC_NO_CUTPASTE<br>
&gt;&nbsp; &nbsp;int vtbuf_set_mark(struct vt_buf *vb, int type, int col, i=
nt row);<br>
&gt;&nbsp; &nbsp;int vtbuf_get_marked_len(struct vt_buf *vb); -void<br>
&gt; vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz);<br>
&gt; +void vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz=
,<br>
&gt; +int<br>
&gt; mark);<br>
&gt;&nbsp; &nbsp;#endif<br>
&gt; <br>
&gt;&nbsp; &nbsp;#define&nbsp; &nbsp; &nbsp; &nbsp; VTB_MARK_NONE&nbsp; &nb=
sp; &nbsp; &nbsp; &nbsp; &nbsp;0<br>
&gt; --------------------------<o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>

--_000_CP6P284MB1900CDE6A053535D5CB6C4F8CB9F9CP6P284MB1900BRAP_--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CP6P284MB1900CDE6A053535D5CB6C4F8CB9F9>