Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Aug 2022 08:12:28 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Ivan Quitschal <tezeka@hotmail.com>
Cc:        Hans Petter Selasky <hps@selasky.org>,  "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: vt newcons 3 clicks mouse paste issue FIXED
Message-ID:  <CANCZdfpMGCBco%2BgDhqAPr%2BrnQauNshaUv3H8wF8z2fmHFtySbg@mail.gmail.com>
In-Reply-To: <CP6P284MB190086D2AD26A14E0C5DA002CB9F9@CP6P284MB1900.BRAP284.PROD.OUTLOOK.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>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000037742205e56af1ac
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thu, Aug 4, 2022 at 8:04 AM Ivan Quitschal <tezeka@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
>
> 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 wa=
s
> 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 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>
> > Enviada em: ter=C3=A7a-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@hotmail.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, its
> 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, and
> still is in
> > xterm/ linux etc
> >
> > now if the event is a 3 mouse clickss select, the space trim is made on
> the 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
> > --------------------------
>

--00000000000037742205e56af1ac
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Thu, Aug 4, 2022 at 8:04 AM Ivan Q=
uitschal &lt;<a href=3D"mailto:tezeka@hotmail.com">tezeka@hotmail.com</a>&g=
t; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p=
x 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Han=
s<br>
<br>
D36042 created<br>
How can I include more patch files in the same defect number? D36042<br>
<a href=3D"https://reviews.freebsd.org/D36042" rel=3D"noreferrer" target=3D=
"_blank">https://reviews.freebsd.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=C2=A0 , never used that phabricator<br></blockquote><div>=
<br></div><div>Generate the diff with &#39;git diff -U99999&#39; to pick up=
 all the changes at once and to give reviewers</div><div>enough context. Ei=
ther don&#39;t specify any files, or specify all the ones in the change (de=
pending</div><div>on the state of your tree). Upload that diff. you can use=
 the web interface to &#39;update&#39; the diff to</div><div>include everyt=
hing, no need to make a new one.</div><div><br></div><div>Warner</div><div>=
=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
--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=C3=A7a-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=C2=A0 =C2=A0 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;=C2=A0 =C2=A0}<br>
&gt; <br>
&gt;=C2=A0 =C2=A0void<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;=C2=A0 =C2=A0{<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 int i, j, r, c, cs, ce;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 term_pos_t s, e;<br>
&gt; @@ -799,7 +799,7 @@<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 buf[i++] =3D vb-&gt;vb_rows[r][c];<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* For a=
ll rows, but the last one. */<br>
&gt; -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (r !=3D e.t=
p_row) {<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (r !=3D e.t=
p_row || mark =3D=3D VTB_MARK_ROW) {<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 /* Trim trailing word separators, if any. */<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 for (; i !=3D j; i--) {<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (!tchar_is_word_separat=
or(buf[i - 1]))<br>
&gt; --------------------<br>
&gt; <br>
&gt; --- sys/dev/vt/vt_core.c.orig=C2=A0 =C2=A02022-08-02 08:43:15.43641500=
0 -0300<br>
&gt; +++ sys/dev/vt/vt_core.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 2022-08-02 08:43:4=
9.120096000 -0300<br>
&gt; @@ -2287,7 +2287,7 @@<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 VD_PASTEBUFSZ(vd) =3D len;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Reque=
st copy/paste buffer data, no more than `len&#39; */<br>
&gt; -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0vtbuf_extract_=
marked(&amp;vw-&gt;vw_buf, VD_PASTEBUF(vd), len);<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0vtbuf_extract_=
marked(&amp;vw-&gt;vw_buf, VD_PASTEBUF(vd), len,<br>
&gt; + mark);<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 VD_PASTE=
BUFLEN(vd) =3D len;<br>
&gt; <br>
&gt; ---------------------<br>
&gt; <br>
&gt; --- sys/dev/vt/vt.h.orig=C2=A0 =C2=A0 =C2=A0 =C2=A0 2022-08-02 08:41:2=
3.888584000 -0300<br>
&gt; +++ sys/dev/vt/vt.h=C2=A0 =C2=A0 =C2=A02022-08-02 08:41:54.504309000 -=
0300<br>
&gt; @@ -238,7 +238,7 @@<br>
&gt;=C2=A0 =C2=A0#ifndef SC_NO_CUTPASTE<br>
&gt;=C2=A0 =C2=A0int vtbuf_set_mark(struct vt_buf *vb, int type, int col, i=
nt row);<br>
&gt;=C2=A0 =C2=A0int 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;=C2=A0 =C2=A0#endif<br>
&gt; <br>
&gt;=C2=A0 =C2=A0#define=C2=A0 =C2=A0 =C2=A0 =C2=A0 VTB_MARK_NONE=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00<br>
&gt; --------------------------<br>
</blockquote></div></div>

--00000000000037742205e56af1ac--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpMGCBco%2BgDhqAPr%2BrnQauNshaUv3H8wF8z2fmHFtySbg>