summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-08-17 04:14:11 +0200
committerPablo Barciela <[email protected]>2018-08-19 05:34:29 +0200
commit708bfc0c84daf1f3a44ab3f0d87845f9a1429b5d (patch)
tree1d918863f9a93c1fd336a20368aab5b2e3cff2f1
parente28def84292e2bf1d1fa9699c040a9072bcc4548 (diff)
downloadpluma-708bfc0c84daf1f3a44ab3f0d87845f9a1429b5d.tar.bz2
pluma-708bfc0c84daf1f3a44ab3f0d87845f9a1429b5d.tar.xz
pluma-sort-plugin: avoid extra empty line
Fixes https://github.com/mate-desktop/pluma/issues/153
-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 67a3a1ce..d512f4b8 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];
}