summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/sort/pluma-sort-plugin.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/sort/pluma-sort-plugin.c b/plugins/sort/pluma-sort-plugin.c
index 49d804bf..6405cd76 100644
--- a/plugins/sort/pluma-sort-plugin.c
+++ b/plugins/sort/pluma-sort-plugin.c
@@ -434,10 +434,12 @@ sort_real (SortDialog *dialog)
&start,
lines[i],
-1);
- gtk_text_buffer_insert (GTK_TEXT_BUFFER (doc),
- &start,
- "\n",
- -1);
+
+ if (i < (num_lines - 1))
+ gtk_text_buffer_insert (GTK_TEXT_BUFFER (doc),
+ &start,
+ "\n",
+ -1);
last_row = lines[i];
}