Scenario: I am trying to copy something into Pycharm. When accidentally selecting something (even an empty line) in Pycharm, it gets copied and overwrites the buffer. Pasting then pastes the empty line (or whatever got selected) instead of what I copied originally.
Is it possible to avoid this behaviour?
If you launch Pycharm using XServer, then the following worked for me (ref):
I have also disabled Settings | Tools | Terminal | Copy to clipboard of selection option.
To get the history of the clipboard press Ctrl + Shift + V or go to
Edit
>Paste from History
,This opens a dialog with previous copies which looks like this,
from the top box, select the relevant copy and press ok.
Press Ctrl+Alt+S to open the settings. Type "copy" into the search bar. Disable this checkbox: