Commit 77b35cee authored by Chris Allegretta's avatar Chris Allegretta
Browse files

Buglet fix for for losing text on wrap current_x < wrapcol

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@34 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 6 additions and 8 deletions
+6 -8
...@@ -699,15 +699,13 @@ assert (strlenpt(inptr->data) >= fill); ...@@ -699,15 +699,13 @@ assert (strlenpt(inptr->data) >= fill);
temp->data = nmalloc(strlen(&inptr->data[current_word_start]) + 1); temp->data = nmalloc(strlen(&inptr->data[current_word_start]) + 1);
strcpy(temp->data, &inptr->data[current_word_start]); strcpy(temp->data, &inptr->data[current_word_start]);
if (!isspace(input_char)) { /* Do this in either case, else words after current_x
i = current_word_start - 1; get chopped... */
while (isspace(inptr->data[i])) { i = current_word_start - 1;
i--; while (isspace(inptr->data[i])) {
assert (i >= 0); i--;
} assert (i >= 0);
} }
else
i = current_x - 1;
inptr->data = nrealloc(inptr->data, i + 2); inptr->data = nrealloc(inptr->data, i + 2);
inptr->data[i + 1] = 0; inptr->data[i + 1] = 0;
......
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