Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jun 2022 21:33:57 +0200
From:      Hans Petter Selasky <hps@selasky.org>
To:        Ivan Quitschal <tezeka@hotmail.com>, Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
Cc:        "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>, Kurt Jaeger <pi@freebsd.org>
Subject:   Re: RES: RES: RES: RES: vt newcons mouse paste issue FIXED
Message-ID:  <3b66a26a-d170-860b-6b58-7514b49a2c79@selasky.org>
In-Reply-To: <CP6P284MB1900578BBC31730413B30643CBB59@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> <CP6P284MB1900794465902392ACDA36C2CBB29@CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM> <b868c9f4-0a2b-00b9-30e0-d612d17d4bba@selasky.org> <CP6P284MB1900578BBC31730413B30643CBB59@CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6/23/22 21:32, Ivan Quitschal wrote:
> 
>> Hi,
>>
>> Please test this latest version:
>> https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Freviews.freebsd.org%2FD35552&amp;data=05%7C01%7C%7C8a105d5de0164d4b2eac08da554bfeb2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637916082154929613%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=0qxyXDZSJ3lElK7HGgK200mwrV3%2Bn%2Ftj5%2B5VbxFLxOA%3D&amp;reserved=0
> 
>> --HPS
> 
> Hi Hans
> 
> The version before worked just fine. I will test this one and let you know
> But I have a suggestion to make:
> 
> Today the trim is being done on every line , even on the last one . for example, if you mark the mouse:
> 
> |from here        |to here
> |                          |
> "Blablabla            "(you can see there are 10 spaces )
> _____________
> 
> It will only copy the Blablabla (im talking about the *last* line only, or when it's just one line)
> 
> What if you do something like this?
> 
> Moving this part of code into the "non last line block"
> 
> 		/* Add new line for all rows, but not for last one. */
> 		if (r != e.tp_row)
> 		{
> 			/* Trim trailing whitespace from each line, if any. */
> 			for (; i != j; i--) {
> 				if (TCHAR_CHARACTER(buf[i - 1]) == ' ')
> 					buf[i - 1] = '\0';
> 				else
> 					break;
> 			}
> 			buf[i++] = '\r';
> 		}
> 
> This way you would trim all the lines but the last one.
> Just an idea , what do you think?

Sounds reasonable. Let me update the patch.

--HPS




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3b66a26a-d170-860b-6b58-7514b49a2c79>