delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/03/17/19:22:52

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1839A385801E
Authentication-Results: sourceware.org;
dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:content-transfer-encoding;
bh=ujJQEngqY2KIjZ6HJmJVDkRT5R399rdwDTAsYzS6eFw=;
b=Ya2LBaajgsdQiwy4KnRY81bCUYyx+PbVL4N4QH5YnvhMQe/1KGhPRUJzr17QHsYNwm
y6yF8AdI0HzF05D5fTpa2JIwHEOAIrvL9xyVUcyXq/rFNrfa1G3mn6m96ENTBnm4LlLz
2tZOrBdmi9itNUjXRjNFpK0Ako/2fZmYZQ5t1ICn7e4yGiEehNUABBzlrwIGrCi/lLfG
sfka8LN4Y8ukN8O3SYASWgKIG3Uh6BbY/6G5hUiRCTsHc1hErpRAT8lWJrO599hWOfHk
8VLJU15apuF1AV5uUOAcwNHl/+XAd17zXlgmV/VgjDWpkr05YmISlgQu57g/OwCpBuvr
TZDQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:content-transfer-encoding;
bh=ujJQEngqY2KIjZ6HJmJVDkRT5R399rdwDTAsYzS6eFw=;
b=aaNwTi7VRZKFmfALII3KKVJ10+p2v+j5i1TGVQuRtyncqcgfaasXdYpCYQNB8x1tkT
RUJpWxrcFYoHLLRmopFQL+eXonGh96cxgZvz+BCMYOivZod91zCjF+e4BolunGX4DxPK
Zwc2x83sLqlxzdS3n4PueeBJlPUHR9sokgWbVTyuWXaPbWPd/Fz8RQZx9FdkxSd2iHBP
t6u1rNywOccUxFrsT3wfHUO4zsU7aZBSc1dLtHOcBC4qAKeRU2nue9WeWcVoSBgupuZE
Xsamim4puqHCwD87hGtQaqGX3yvYJnhyH31HCFg6le3dPdLOc70VS45juPmcZUrgL+6l
AcxQ==
X-Gm-Message-State: AOAM533Ky5azBfMcNWVBPJjx6hsD3FHKCSvn0Rl7QbWuaSVc13grrVMY
5GzDBFM+RE4iJn+L3jxr8ArCDlhAu0dDRxSEpWRc7ffZTho=
X-Google-Smtp-Source: ABdhPJyaf5Hb2ViYaDiFLoLy9j8Iv1lFYS6tuOlCyMHlhHq8LQbH6fya6kM/oyTLQYd47eXYYK3Fg/uzijSnya3VmCg=
X-Received: by 2002:a05:6870:248c:b0:d7:19f3:a52c with SMTP id
s12-20020a056870248c00b000d719f3a52cmr2710861oaq.149.1647559354326; Thu, 17
Mar 2022 16:22:34 -0700 (PDT)
MIME-Version: 1.0
References: <eabc59f2-ab88-f57c-1fcc-26cd17cd1f0b AT web DOT de>
<c66e9392-1413-8e6d-cb3e-2df0d4c442a6 AT gmail DOT com>
In-Reply-To: <c66e9392-1413-8e6d-cb3e-2df0d4c442a6@gmail.com>
From: Andy Koppe <andy DOT koppe AT gmail DOT com>
Date: Thu, 17 Mar 2022 23:22:23 +0000
Message-ID: <CAHWeT-YP4PVkWwoKR-JUtOheK9yTZ8O7H_kVtRk1q9O5dcZMXQ@mail.gmail.com>
Subject: Re: xterm (or x11) pastes are highlighted
To: Cygwin Tech List <cygwin AT cygwin DOT com>
X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 22HNMqkr010600

On Thu, 17 Mar 2022 at 20:32, René Berber wrote:
>
> On 3/17/2022 1:03 PM, n952162 wrote:
>
> > Does anyone know how I can disable the highlighting that occurs when I
> > copy and paste in xterm?
> >
> > Escape sequences are added to achieve that and sometimes they're not
> > being properly interpreted.
> >
> > Why would I want that anyway?
>
> The same thing happens to (plain, non X windows) mintty.
>
> It started recently, maybe a couple of weeks.  No idea how to fix it,
> haven't really tried.
>
> Very annoying.

It came in with the readline 8.1 update in September last year, which
enabled "bracketed paste mode" by default. (I think zsh has had it
enabled for a few years.)

As n952162 said, it tells the terminal to enclose pasted text in
escape sequences.

There are several points to this:
- It stops accidental multi-line pastes from getting immediately
executed line by line.
- It makes it easier to undo a paste, as you can cut it out in one go
rather than deleting manually.
- Pasting can be faster, as the application can process the paste in
one chunk rather than treating it as char-by-char keyboard input.

But yep, sometimes it can go wonky, in particular when the bracketing
mode for some reason is left on for an application that doesn't expect
it.

For readline, it can be disabled in ~/.inputrc:

set enable-bracketed-paste off

Regards,
Andy

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019