public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* xterm (or x11) pastes are highlighted
@ 2022-03-17 19:03 n952162
  2022-03-17 20:31 ` René Berber
  0 siblings, 1 reply; 7+ messages in thread
From: n952162 @ 2022-03-17 19:03 UTC (permalink / raw)
  To: cygwin

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?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: xterm (or x11) pastes are highlighted
  2022-03-17 19:03 xterm (or x11) pastes are highlighted n952162
@ 2022-03-17 20:31 ` René Berber
  2022-03-17 21:17   ` n952162
  2022-03-17 23:22   ` Andy Koppe
  0 siblings, 2 replies; 7+ messages in thread
From: René Berber @ 2022-03-17 20:31 UTC (permalink / raw)
  To: cygwin

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.
-- 
R. Berber

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: xterm (or x11) pastes are highlighted
  2022-03-17 20:31 ` René Berber
@ 2022-03-17 21:17   ` n952162
  2022-03-17 23:22   ` Andy Koppe
  1 sibling, 0 replies; 7+ messages in thread
From: n952162 @ 2022-03-17 21:17 UTC (permalink / raw)
  To: cygwin

On 3/17/22 21:31, 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.


maybe it comes from Windows?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: xterm (or x11) pastes are highlighted
  2022-03-17 20:31 ` René Berber
  2022-03-17 21:17   ` n952162
@ 2022-03-17 23:22   ` Andy Koppe
  2022-03-18  6:09     ` n952162
  2022-03-18  7:22     ` n952162
  1 sibling, 2 replies; 7+ messages in thread
From: Andy Koppe @ 2022-03-17 23:22 UTC (permalink / raw)
  To: Cygwin Tech List

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: xterm (or x11) pastes are highlighted
  2022-03-17 23:22   ` Andy Koppe
@ 2022-03-18  6:09     ` n952162
  2022-03-18  7:22     ` n952162
  1 sibling, 0 replies; 7+ messages in thread
From: n952162 @ 2022-03-18  6:09 UTC (permalink / raw)
  To: cygwin

On 3/18/22 00:22, Andy Koppe wrote:
> 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
>

Thank you for a very informative and helpful response!



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: xterm (or x11) pastes are highlighted
  2022-03-17 23:22   ` Andy Koppe
  2022-03-18  6:09     ` n952162
@ 2022-03-18  7:22     ` n952162
  2022-03-18 21:55       ` Andy Koppe
  1 sibling, 1 reply; 7+ messages in thread
From: n952162 @ 2022-03-18  7:22 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1921 bytes --]

Am 18.03.2022 um 00:22 schrieb Andy Koppe:
> 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


Andy, perhaps you can speak to another, almost related issue, which I
posted on 10th of March:

    /xterm*VT100.Translations only when mouse is over the window with focus/

A copy is attached here.  This is only a Cygwin issue, as far as I know.

Perhaps you can recommend someone who I could turn to, to get a fix, an
explanation, a workaround, or help to get started doing a fix?

n952162


//

[-- Attachment #2: Bug report for cygwin X server (or xterm).eml --]
[-- Type: message/rfc822, Size: 16675 bytes --]

From: n952162 <n952162@web.de>
To: cygwin@cygwin.com
Subject: Bug report for cygwin X server (or xterm)
Date: Thu, 10 Mar 2022 10:37:40 +0100
Message-ID: <0c793a07-deef-da10-1108-0de8802c5c5f@web.de>

xterm*VT100.Translations only when mouse is over the window with focus

Discovered with click-to-focus, in FVWM

In particular, I'm talking about the function keys. In this case, these
are NOT mapped in fvwm, but in xterm.

Pressing a function key, like F1, always writes to the window with
focus, but only performs the X11/xterm translations when the mouse is
hovering over the window with focus.

So, I always have to move the mouse to the window to be able to write to
the window. Otherwise, \e[P is written to the window, for example

Note that I can visit various windows with keyboard shortcuts, so
there's no natural correspondence with mouse position and window focus.

This failure to do the X11/xterm translation only occurs with x11/cygwin
xterms. Windows opened locally via sshd (port forwarded) behave
normally, performing the translation to the focused window, no matter
where the mouse is.

Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.21.1.3
OS: CYGWIN_NT-10.0-19042 me 3.3.4-341.x86_64 2022-01-31 19:35 UTC x86_64
OS: Windows 10  [Windows NT 10.0 build 19042] x64
Package: version 21.1.3-1 built 2022-01-14

XWin was started with the following command line:

/usr/bin/X :0 -auth /home/ge45tep/.serverauth.6258


00675~>xterm -version
XTerm(370)


fvwm 2.6.6 compiled on Oct 10 2016 at 00:25:52 with support for:
ReadLine, XPM, PNG, SVG, Shape, XShm, SM, Bidi text, Xinerama, XRender,
XCursor, XFT, NLS

-- 
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: xterm (or x11) pastes are highlighted
  2022-03-18  7:22     ` n952162
@ 2022-03-18 21:55       ` Andy Koppe
  0 siblings, 0 replies; 7+ messages in thread
From: Andy Koppe @ 2022-03-18 21:55 UTC (permalink / raw)
  To: Cygwin Tech List

On Fri, 18 Mar 2022 at 07:23, n952162 wrote:
>
> Am 18.03.2022 um 00:22 schrieb Andy Koppe:
> > 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
>
>
> Andy, perhaps you can speak to another, almost related issue, which I
> posted on 10th of March:
>
>     /xterm*VT100.Translations only when mouse is over the window with focus/
>
> A copy is attached here.  This is only a Cygwin issue, as far as I know.
>
> Perhaps you can recommend someone who I could turn to, to get a fix, an
> explanation, a workaround, or help to get started doing a fix?

I'm afraid I can't help with that, but hopefully the Cygwin/X
maintainer has seen your report. It might be interesting whether it
happens in the different XWin modes (single window, rootless,
multiwindow), or on a Linux host.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-03-18 21:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17 19:03 xterm (or x11) pastes are highlighted n952162
2022-03-17 20:31 ` René Berber
2022-03-17 21:17   ` n952162
2022-03-17 23:22   ` Andy Koppe
2022-03-18  6:09     ` n952162
2022-03-18  7:22     ` n952162
2022-03-18 21:55       ` Andy Koppe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).