<p>The Scintilla editing widget that Geany uses defines a selection as between the current cursor and the anchor, and clicking in the widget moves <em>both</em> 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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/2323?email_source=notifications&email_token=AAIOWJ5HU4X6BAGMD3RFLATQLPZKJA5CNFSM4I2S5WL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7TYMWY#issuecomment-535266907">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJZUJMDFLVZX7D6O2VLQLPZKJANCNFSM4I2S5WLQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJ3HHAIM7FHBFWURRA3QLPZKJA5CNFSM4I2S5WL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7TYMWY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/2323?email_source=notifications\u0026email_token=AAIOWJ5HU4X6BAGMD3RFLATQLPZKJA5CNFSM4I2S5WL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7TYMWY#issuecomment-535266907",
"url": "https://github.com/geany/geany/issues/2323?email_source=notifications\u0026email_token=AAIOWJ5HU4X6BAGMD3RFLATQLPZKJA5CNFSM4I2S5WL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7TYMWY#issuecomment-535266907",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>