From nobody Thu Jun 23 19:33:57 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 05B50869C05 for ; Thu, 23 Jun 2022 19:34:08 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4LTVmt1fWpz4VgH; Thu, 23 Jun 2022 19:34:06 +0000 (UTC) (envelope-from hps@selasky.org) Received: from [10.36.2.165] (unknown [178.232.223.95]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B0D5A260100; Thu, 23 Jun 2022 21:34:03 +0200 (CEST) Message-ID: <3b66a26a-d170-860b-6b58-7514b49a2c79@selasky.org> Date: Thu, 23 Jun 2022 21:33:57 +0200 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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: RES: RES: RES: RES: vt newcons mouse paste issue FIXED Content-Language: en-US To: Ivan Quitschal , Tomoaki AOKI Cc: "freebsd-current@freebsd.org" , Kurt Jaeger References: <41ef5c38-515f-739a-cb47-7cab0e609526@selasky.org> <20220623014847.067b18a5ba388639cf6009ce@dec.sakura.ne.jp> From: Hans Petter Selasky In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4LTVmt1fWpz4VgH X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-1.06 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.58)[0.577]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.34)[-0.339]; MLMMJ_DEST(0.00)[freebsd-current]; FREEMAIL_TO(0.00)[hotmail.com,dec.sakura.ne.jp]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[178.232.223.95:received] X-ThisMailContainsUnwantedMimeParts: N 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&data=05%7C01%7C%7C8a105d5de0164d4b2eac08da554bfeb2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637916082154929613%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0qxyXDZSJ3lElK7HGgK200mwrV3%2Bn%2Ftj5%2B5VbxFLxOA%3D&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