From 957fc585cb9a1edd2ea4ae73f5c03896b35736d3 Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Fri, 17 Aug 2018 04:14:11 +0200 Subject: pluma-sort-plugin: avoid extra empty line Fixes https://github.com/mate-desktop/pluma/issues/153 --- plugins/sort/pluma-sort-plugin.c | 10 ++++++---- 1 file 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]; } -- cgit v1.2.1