From 801a8b51d1e7e9b6e977ad376d9e4c08adf65220 Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Mon, 14 Mar 2005 00:29:37 +0000
Subject: [PATCH] remove erroneous if clause in the overhauled justify code

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2361 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 src/nano.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/src/nano.c b/src/nano.c
index 5e4f01bb..8301b86f 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -3084,7 +3084,6 @@ void do_justify(bool full_justify)
 	    current->next->data = charalloc(indent_len + line_len -
 		break_pos);
 	    charcpy(current->next->data, indent_string, indent_len);
-
 	    strcpy(current->next->data + indent_len, current->data +
 		break_pos + 1);
 
@@ -3101,17 +3100,13 @@ void do_justify(bool full_justify)
 	    }
 #endif
 
-	    /* Break the line.  If this isn't the last line of the
-	     * paragraph, add a space after where we break it. */
+	    /* Break the line, and add the space back to where we broke
+	     * it. */
 	    null_at(&current->data, break_pos);
-
-	    if (par_len > 1) {
-		current->data = charealloc(current->data,
-			break_pos + 2);
-		current->data[break_pos] = ' ';
-		current->data[break_pos + 1] = '\0';
-		totsize++;
-	    }
+	    current->data = charealloc(current->data, break_pos + 2);
+	    current->data[break_pos] = ' ';
+	    current->data[break_pos + 1] = '\0';
+	    totsize++;
 
 	    /* Go to the next line. */
 	    par_len--;
-- 
GitLab