GNOME Bugzilla – Bug 759404
Keep selected text in each tab
Last modified: 2021-06-10 21:03:17 UTC
- Gnome-terminal: 1. Switch to tab1, highlight some text (let's say "text1"), Ctrl+Shift+C to copy to the clipboard, paste it somewhere else. 2. Switch to tab2, highlight some text (let's say "text2"), Ctrl+Shift+C, paste it somewhere. 3. Switch back to tab1, the selection is gone. You need to highlight "text1" again to be able to copy-paste it. - Konsole, iTerm2, Mac's default terminal too if I recall correctly, Firefox, Chrome: 1., 2. as above. 3. Switch back to tab1. "text1" is still highlighted, pressing Ctrl+Shift+C copies to the clipboard without having to highlight it again. I find this behavior really convenient and saves me a lot of time during my daily work on iterm.
This is done so that the selection corresponds to the X PRIMARY selection. I'm ok with changing this.
I don't think you should break the PRIMARY <> selection correspondence. I would suggest to remember the selection for each tab and select it again on tab switch
My proposed change would break the visual feedback (the expectation that the highlighted text is the same as PRIMARY would no longer hold) but would not break any workflow; whereas your proposed change would break the behavior (users might expect PRIMARY not to change on a tab change, and their workflow / muscle memory might no longer work). I find the latter more dangerous. Konsole, FF & Chrome don't update PRIMARY on tab change. Having two kinds of copy-paste buffers sucks big time to begin with. Having two different behaviors in tabbed UIs is not nice either. Preferably I wouldn't introduce a third kind of behavior – I think that'd be more misleading than doing what firefox & chrome already do. What I'm thinking about is using some dimmed color for selection if it no longer matches PRIMARY – would this sound good for you?
Also note that this feature is not only useful when switching between g-t tabs; it's also useful when switching between g-t windows, or between other apps as well. So hooking up to a tab change wouldn't be enough, we should also hook up to focus change. This probably wouldn't work reliably due to the infamous focus bug 677329. But even if that bug was fixed, I wouldn't think this is the right approach.
(In reply to Egmont Koblinger from comment #3) > > What I'm thinking about is using some dimmed color for selection if it no > longer matches PRIMARY – would this sound good for you? No, thats the terrible firefox behavior. I absolutely hate that.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/7627.