Middle-click Linux copy/paste is broken in IntelliJ 2020.1
Answered
I'm running IntelliJ IDEA Ultimate 2020.1 on a Xubuntu 18.04 system.
The new release seems to have broken middle-click copy/paste under Linux.
If I press CTRL-F to search my code for the string "foo", and then I start selecting bits of text and using middle-click to duplicate the selected code, then more often than not I end up pasting the search text "foo", not the bit of text I actually selected.
This brokenness is new in the latest release, 2020.1.
Please sign in to leave a comment.
Do you have middle mouse click assigned to "Paste from X clipboard" in "Settings | Keymap"?
Yes. To be clear, the middle-click is doing a paste operation. It's just that when I have the search box open, IntelliJ seems to keep spamming my X clipboard with the search text, not the text I've just selected. So most of the time, middle-clicking is pasting the search text, not the block of text I just selected.
I get the same behaviour trying to copy/paste text from IntelliJ into an external text editor. The usually clipboard contains the search string, not the selected text.
I think the issue is that whenever I type anything, IntelliJ is copying the search string to the X clipboard.
I cannot recreate the problem. Possibly the text in Find gets selected somehow before you click middle mouse button?
OK, so here's a simple example. I set up this document. And searched for the string "foo", which appears in the text a few times. I selected the text "bar" with the mouse, and went down the screen pasting it onto every line in turn...
The resulting document looks like this...
Everything is fine until I hit line 7. In the process of clicking on line 7, the contents of the clipboard suddenly becomes ".. ", which the what I ended up pasting onto lines 8, 9 and 10. The issues seems to be that the IDE has automatically selected the next occurance of the search term - and for added comedy, copied the text which now appears in the location where the search term used to be before my paste operation.
Thanks for clarifying. I filed a new issue.
Please, vote and follow for updates. If you aren't familiar with YouTrack, see this post.
This is still an issue: https://youtrack.jetbrains.com/issue/IDEA-205864
The bug is "shelved" right now. Do you think your team will have time to work on it?
The middle-click copy-paste behavior is very inconsistent when compared with other linux applications including chrome. Overwriting the selection anytime you use the IntelliJ search tool basically makes the clipboard selection impossible to use effectively.
In fact, I'd rather be able to turn off the clipboard selection in IntelliJ completely than have it spam my text selection, which I use for other applications.