The Scintilla editing widget that Geany uses defines a selection as between the 
current cursor and the anchor, and clicking in the widget moves _both_ the 
anchor and cursor to the same place so there is no longer any selection.  So 
its hard to see how it would work since X11 (not Unix, its just that Unix 
usually uses X11) has no actual clipboard to keep the selection on, its 
requested dynamically when the middle click happens.

This is the same as all the editors I have available to test, the one outlier 
is this edit here in the browser, in Chromium, which explains why atom does it 
since electron is Chromium.  Its probable that Chromium isn't actually using 
the X11 paste on middle click and is doing it itself.

And the cause of your ending up pasting in the wrong place may be that middle 
click pastes where the X11 cursor is, not where the Scintilla cursor is.  That 
happens even here in the browser.  Of course its hard to ensure that cursor is 
exactly where you want it, since it can be on any pixel, and has to be mapped 
to the character position.

Scintilla grew up on Windows, so as an baby editor it only had copy/paste and 
thats still its main way of working since the paste goes to the editing widget 
cursor position that is stable and well defined.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2323#issuecomment-535266907

Reply via email to