<p><b>@b4n</b> requested changes on this pull request.</p>

<p>With a quick test, I agree that changing the behavior makes sense and is mostly compatible.<br>
For the implementation part, I think this should be all what's needed (no need for a new Scintilla wrapper for something only used once in <em>editor.c</em>, and the function shouldn't be exposed in the headers anyway):</p>
<div class="highlight highlight-source-diff"><pre>From 9b503708203a4986736da33d882f695dee6119c0 Mon Sep 17 00:00:00 2001
From: Colomban Wendling <ban@herbesfolles.org>
Date: Mon, 30 Sep 2019 20:09:12 +0200
Subject: [PATCH] Enable multi-selection clipboard paste

When pasting a single-line clipboard content inside multiple or
rectangular selections, paste it in each selection rather than only
in the main one.

This changes behavior, but the old behavior is easily reproduced by
canceling a multiple selection when a single paste is desired, whereas
it was not possible to obtain multiple pastes before.

<span class="pl-c1">diff --git a/src/editor.c b/src/editor.c</span>
index df25c8808..b02705e36 100644
<span class="pl-md">--- a/src/editor.c</span>
<span class="pl-mi1">+++ b/src/editor.c</span>
<span class="pl-mdr">@@ -4940,6 +4940,10 @@</span> static ScintillaObject *create_new_sci(GeanyEditor *editor)
 #endif
        SSM(sci, SCI_SETRECTANGULARSELECTIONMODIFIER, rectangular_selection_modifier, 0);
 
<span class="pl-mi1"><span class="pl-mi1">+</span>        /* With multiple selections, paste in them all (doesn't affect pasting</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>         * multi-line data in a rectangular selection) */</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>        SSM(sci, SCI_SETMULTIPASTE, SC_MULTIPASTE_EACH, 0);</span>
<span class="pl-mi1"><span class="pl-mi1">+</span></span>
        /* virtual space */
        SSM(sci, SCI_SETVIRTUALSPACEOPTIONS, editor_prefs.show_virtual_space, 0);
 </pre></div>
<p>I'd be happy to get this through, but I won't open a new PR just yet (hehe) and I can't push here. Of course I can create a new PR if <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=811085" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/elextr">@elextr</a>'s happy with it ;)</p><hr>

<p>In <a href="https://github.com/geany/geany/pull/2328#discussion_r329720313">src/editor.c</a>:</p>
<pre style='color:#555'>>      editor->sci = editor_create_widget(editor);
+       sci_set_multipaste(editor->sci, SC_MULTIPASTE_EACH);
</pre>
<p>This should go in <code>editor_create_widget()</code> along the other similar ones.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2328#discussion_r329720623">src/sciwrappers.c</a>:</p>
<pre style='color:#555'>> @@ -93,6 +93,10 @@ sptr_t sci_send_message_internal (const gchar *file, guint line, ScintillaObject
 }
 #endif
 
+ /* Set multi paste setting (at 3104 scintilla defaults to SC_MULTIPASTE_ONCE) */ 
+void sci_set_multipaste(ScintillaObject *sci, gint mpval) { 
+       SSM(sci, SCI_SETMULTIPASTE, mpval, 0); 
+}
</pre>
<p>We don't actually need a new wrapper for just one call, especially not when that call is in <em>editor.c</em>.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2328#discussion_r329720943">src/sciwrappers.h</a>:</p>
<pre style='color:#555'>> @@ -39,9 +39,10 @@ sptr_t sci_send_message_internal (const gchar *file, guint line, ScintillaObject
 # endif
 #endif
 
-void                           sci_set_text                            (ScintillaObject *sci,  const gchar *text);
-gboolean                       sci_has_selection                       (ScintillaObject *sci);
-void                           sci_end_undo_action                     (ScintillaObject *sci);
+void                            sci_set_multipaste              (ScintillaObject *sci, gint mpval);
</pre>
<p>This should be in the <code>GEANY_PRIVATE</code> section below.  Only plugin API functions should be outside of it.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2328#discussion_r329722090">src/sciwrappers.h</a>:</p>
<pre style='color:#555'>> @@ -56,162 +57,162 @@ void                           sci_set_current_position        (ScintillaObject *sci, gint position, gboolean
 
 gint                           sci_get_selection_start         (ScintillaObject *sci);
 gint                           sci_get_selection_end           (ScintillaObject *sci);
-void                           sci_replace_sel                         (ScintillaObject *sci, const gchar *text);
+void                           sci_replace_sel                 (ScintillaObject *sci, const gchar *text);
</pre>
<p>Please don't rewrite unrelated indentation, even if it was incorrect (and here it's not, Geany uses a tab width of 4, which aligns well).  Changes like this make it a lot harder to read the actual, meaningful changes, and should be made in a specific commit if at all.</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/pull/2328?email_source=notifications&email_token=AAIOWJY2UM7OXUN24YO4I4LQMJAHJA5CNFSM4I3IVKHKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCGL5LXI#pullrequestreview-295163357">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ3UMIPA6BVC4IRJBELQMJAHJANCNFSM4I3IVKHA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJYPSYUFKGHS3HNJ76TQMJAHJA5CNFSM4I3IVKHKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCGL5LXI.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/pull/2328?email_source=notifications\u0026email_token=AAIOWJY2UM7OXUN24YO4I4LQMJAHJA5CNFSM4I3IVKHKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCGL5LXI#pullrequestreview-295163357",
"url": "https://github.com/geany/geany/pull/2328?email_source=notifications\u0026email_token=AAIOWJY2UM7OXUN24YO4I4LQMJAHJA5CNFSM4I3IVKHKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCGL5LXI#pullrequestreview-295163357",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>