Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]xfce4-terminal started highlighting pasted text
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3918

PostPosted: Tue Dec 29, 2020 7:41 pm    Post subject: [SOLVED]xfce4-terminal started highlighting pasted text Reply with quote

Lately this behavior started manifesting..
Like in zsh..But I do not have zsh installed.
Is there a way to stop this annoying behavior?

Thanks guys........
_________________
:)


Last edited by alamahant on Tue Dec 29, 2020 8:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1932

PostPosted: Tue Dec 29, 2020 7:57 pm    Post subject: Reply with quote

It's a bash-5.1 feature.

Bash-5.1 release available:
The most visible new feature is in Readline: the addition of `faces', which
highlights the text between the point and mark (the region, so this is also
called the 'active region'). This was added to show visibly the text
inserted by bracketed paste, and also marks the text found by incremental
and non-incremental history searches.  Faces are currently tied to
bracketed paste and are enabled and disabled along with bracketed paste
mode.  Bracketed paste mode is enabled by default.
man bash:
       enable-bracketed-paste (On)
              When set to On, readline will configure the terminal  in  a  way
              that will enable it to insert each paste into the editing buffer
              as a single string of characters, instead of treating each char‐
              acter  as  if it had been read from the keyboard.  This can pre‐
              vent pasted characters from being interpreted  as  editing  com‐
              mands.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2863

PostPosted: Tue Dec 29, 2020 7:58 pm    Post subject: Reply with quote

It's because of new readline-8.1 which made this default, if want it off:
Code:
echo set enable-bracketed-paste off >> ~/.inputrc
Will then be disabled on new shells.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3918

PostPosted: Tue Dec 29, 2020 8:04 pm    Post subject: Reply with quote

Thanks a lot guys....
You are super.
That did it for me.
Very unfortunate and stupid choice of the developers to include such a disgusting feature as a default.
Shame on them.
Thanks Again
_________________
:)
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22697

PostPosted: Tue Dec 29, 2020 8:13 pm    Post subject: Reply with quote

This is particularly bad since you probably actually want bracketed-paste mode enabled. It's usually a good thing. However, the graphical artifacts that are now enabled with it may not be a good thing.
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1932

PostPosted: Tue Dec 29, 2020 8:16 pm    Post subject: Reply with quote

Bracketed paste is pretty useful if you accidentally middle-click paste some random text.
Code:
me@host ~ $ random
multiline
text^C
me@host ~ $ bind "set enable-bracketed-paste off"
me@host ~ $ random
bash: random: command not found
me@host ~ $ multiline
bash: multiline: command not found
me@host ~ $ text

It doesn't try to execute it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum