<p>This is more a feature request than a bug, so no immediate attention is required. The problem is selecting lines to indent and copy for pasting. If you full-select lines 1-10, and then choose indent, the existing selection does not include the new indent of the 1st line (meaning after indent, the selection bounds are never updated on line 1 to include the new spaces inserted before line one for the indent -- at least it behaves that way on windows) I have run into similar issues before and would propose a fix something like the following within the indent loop. Just a simple check if we are indenting the first line, and if so, move the start mark back to the beginning of the first line:</p>
<pre><code>        /* reset start iter and start mark to beginning of line
         * so that selection continues to encompass entire first line.
         */
        if (start_line != end_line && i == start_line &&
            !gtk_text_iter_starts_line (&iter)) {
            gtk_text_iter_set_line_offset (&iter, 0);
            gtk_text_buffer_move_mark (buf, start_mark, &iter);
        }
</code></pre>
<p>then before return from the indent function just set the select range to encompass all indented lines:</p>
<pre><code>    /* adjust selection to cover entire first line */
    gtk_text_buffer_select_range (buf, end, start);
</code></pre>
<p>I haven't checked whether geany is using indent features from scintilla or just a loop and custom indent function, so this may have to be wrapped around scintilla's indention.</p>
<p>A noted, this is just a feature request for tweaking the select range following indent so the whole newly indented range remains selected. Keep up the great work. Geany is by far the hands down favorite non-desktop integrated editor.</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/1693">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ_BqwR6bcpOiTcKPOitDWSwPj8wZks5s4okggaJpZM4Qlc3I">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ9OBQSCyApjZYWLM201E7PL683zDks5s4okggaJpZM4Qlc3I.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1693"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Indent of selected range and copy doesn't include indent of first line (#1693)"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1693"}}}</script>