[Bug 1926256] Re: Pasted text in the terminal is always highlighted and selected
Egmont Koblinger
1926256 at bugs.launchpad.net
Sun May 16 07:44:23 UTC 2021
> You mean it will always be like this going forward?
I don't know. This was a change in the default shell "bash". I'm not
involved in bash's development, nor in Ubuntu's. I don't know what their
plans are. I don't know if this feature can be disabled in bash (but I
know that it's bash's documentation to consult). I don't know if Ubuntu
plans to disable it by default.
> Is this the feature you are referring to?...
> ..or, is it this one?...
I'm not aware of the exact details of bash's change, and I haven't tried
bash-5.1 yet. Both of these look relevant, probably one of them is
exactly this one.
> I find there is an inconsistency with this new approach:
> If you've just pasted text, then highlight the text, the text looks
> unhighlighted.
> This is visually confusing.
This is a good observation. gnome-terminal by default inverts the colors
of each cell (I mean: swaps the background and the foreground color)
when you highlight with the mouse. Now, if an application also does this
(like bash now when pasting, or that one row of "top", etc.), and then
you highlight with the mouse, these two operations cancel out each other
and you're back to your regular colors. Both components do something
that's reasonable on its own, yet the two don't work together nicely.
One possible workaround is to configure your terminal to use some fixed
colors for highlighting. I, for one, have configured gnome-terminal to
use the same orange-ish background that Ubuntu uses anywhere else in GTK
when highlighting text. You can configure it in profile settings ->
colors, or emit the OSC 17 & 19 escape sequences to achieve the same
effect, e.g. «echo -ne '\e]17;#f18458\e\\'». Presumably most other
terminal emulators also support this feature. This might even be
something for Ubuntu to consider doing globally for all the users by
default.
Alternatively, you should be able to disable this feature of bash, or
configure it to use different colors rather than inverse video. I don't
know if these possibilities are implemented in bash, if not then you
might need to patch its source or its the developers to add such
features.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1926256
Title:
Pasted text in the terminal is always highlighted and selected
Status in bash package in Ubuntu:
Confirmed
Status in gnome-terminal package in Ubuntu:
Invalid
Status in mate-terminal package in Ubuntu:
Confirmed
Status in vte2.91 package in Ubuntu:
Confirmed
Bug description:
Steps to reproduce:
1. Have Ubuntu 21.04 installed
2. Launch terminal
3a. Execute some command, select this command to copy it, then paste command
3b. Paste some command from clipboard to terminal
Expected result:
* pasted command is not highlighted and is not selected
Actual result:
* pasted command is selected and highlighted
ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: mate-terminal 1.24.1-1
ProcVersionSignature: Ubuntu 5.11.0-16.17-generic 5.11.12
Uname: Linux 5.11.0-16-generic x86_64
ApportVersion: 2.20.11-0ubuntu65
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: MATE
Date: Tue Apr 27 09:43:56 2021
InstallationDate: Installed on 2021-04-23 (3 days ago)
InstallationMedia: Ubuntu-MATE 21.04 "Hirsute Hippo" - Release amd64 (20210420)
SourcePackage: mate-terminal
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1926256/+subscriptions
More information about the foundations-bugs
mailing list