Version: (using Devel) OS: Linux Installed from: Compiled sources I've just started using konsole (having used rxvt for quite a while), and unlike rxvt and other applications (like e.g. konqueror), the selection in konsole isn't cleared when another application takes over the selection buffer (e.g. by selecting something in another konsole window). I don't know if this is intentional, but it annoyed me enough that I've written a patch to fix this, which will be attached shortly. I've implemented the clearing of the selection in the TerminalWindow class, as this is also the class that takes care of informing the Screen and ScreenWindow classes of mouse-initiated selection changes, so I hope that I haven't violated the MVC hierarchy.
Created attachment 28399 [details] Implement the feature Btw, it's the TerminalDisplay class, not TerminalWindow.
Patch looks good. Will commit shortly.
Unfortunately I discovered a problem with the patch. It only handles the case where it is another process that takes over the selection. But when konsole is started from the menu instead of from the command line, the same konsole process is reused, and another window is added. The same is true when using tabs. So in these cases the the selection isn't cleared, when a new selection is made in e.g. another tab of the same konsole. I'm working on a patch to solve this, but it pretty late here, and it doesn't work currently, so it'll have to wait until tomorrow.
Created attachment 28416 [details] When selecting, remove the selection from other windows from the same process This is patch handles the in-process selection clearing, that the first patch doesn't handle. Both should be applied in order to have the selection cleared when a new selection is made. Again, the patch is against SVN trunk.
Example: 1. Highlight A in tab 1 2. Highlight B in tab 2 3. Copy/Paste tab1 - get A 4. Copy/Paste tab2 - get B Isn't this the way it should be? I'm not clear on why you want to clear the selections on other sessions.
It might be by design, I don't know. If it is, it behaves differently that eg. konqueror, kopete and most other programs, which clears the selection when a new selection is made. It makes sense, as X actually have two ways to copy/paste. The selection buffer, which you use when you copy text by selecting it, and pasting by middle clicking. And the clipboard which is where the text ends up when you actively copy it after selecting (eg. by pressing CTRL+C). So if the selection is cleared when a new selection is made, you have a visual cue as to what is currently in the selection buffer, by simply looking at which text is marked on your screen. I get caught by this a few times each day, believing that my selection buffer still contains the text I can see is marked in a konsole, even though its been replaced, leading me to paste the wrong text.
Was there any consensus on how this should be handled in Konsole?
A few people have mentioned this the current behavior is correct for KDE apps. I would tend to agree, selecting text should not clear all the others. Marking as invalid. Comment further if you disagree.