Commit 801a8b51 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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
No related merge requests found
Showing with 6 additions and 11 deletions
+6 -11
...@@ -3084,7 +3084,6 @@ void do_justify(bool full_justify) ...@@ -3084,7 +3084,6 @@ void do_justify(bool full_justify)
current->next->data = charalloc(indent_len + line_len - current->next->data = charalloc(indent_len + line_len -
break_pos); break_pos);
charcpy(current->next->data, indent_string, indent_len); charcpy(current->next->data, indent_string, indent_len);
strcpy(current->next->data + indent_len, current->data + strcpy(current->next->data + indent_len, current->data +
break_pos + 1); break_pos + 1);
...@@ -3101,17 +3100,13 @@ void do_justify(bool full_justify) ...@@ -3101,17 +3100,13 @@ void do_justify(bool full_justify)
} }
#endif #endif
/* Break the line. If this isn't the last line of the /* Break the line, and add the space back to where we broke
* paragraph, add a space after where we break it. */ * it. */
null_at(&current->data, break_pos); null_at(&current->data, break_pos);
current->data = charealloc(current->data, break_pos + 2);
if (par_len > 1) { current->data[break_pos] = ' ';
current->data = charealloc(current->data, current->data[break_pos + 1] = '\0';
break_pos + 2); totsize++;
current->data[break_pos] = ' ';
current->data[break_pos + 1] = '\0';
totsize++;
}
/* Go to the next line. */ /* Go to the next line. */
par_len--; par_len--;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment