<p>In <a href="https://github.com/geany/geany-plugins/pull/324#discussion_r49947082">lineoperations/src/linefunctions.c</a>:</p>
<pre style='color:#555'>> +
> +  sci_end_undo_action(doc->editor->sci);
> +}
> +
> +
> +/* Sort Lines Ascending and Descending */
> +void sortlines(GeanyDocument *doc, gboolean asc) {
> +  gint  total_num_chars;  /* number of characters in the document */
> +  gint  total_num_lines;  /* number of lines in the document */
> +  gchar **lines;          /* array to hold all lines in the document */
> +  gchar *new_file;        /* *final* string to replace current document */
> +  gint  i;                /* iterator */
> +
> +  total_num_chars = sci_get_length(doc->editor->sci);
> +  total_num_lines = sci_get_line_count(doc->editor->sci);
> +  lines           = g_malloc(sizeof(gchar *) * total_num_lines+1);
</pre>
<p>Fix available at <a href="https://github.com/b4n/geany-plugins/commit/ee354655993507b7b998a3c13e4417ea0b1286af" class="commit-link">b4n@<tt>ee35465</tt></a></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany-plugins/pull/324/files#r49947082">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ1kqRF0F3qV8RgQIXRYZ1vNOJfrsks5pa58qgaJpZM4HBhj7.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-plugins/pull/324/files#r49947082"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>