- do_wrap() spaces between words fix.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@36 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
6724a7ed39
commit
ee39d57e8c
8
nano.c
8
nano.c
|
@ -707,13 +707,17 @@ assert (strlenpt(inptr->data) >= fill);
|
|||
temp->data = nmalloc(strlen(&inptr->data[current_word_start]) + 1);
|
||||
strcpy(temp->data, &inptr->data[current_word_start]);
|
||||
|
||||
/* Do this in either case, else words after current_x
|
||||
get chopped... */
|
||||
if (!isspace(input_char)) {
|
||||
i = current_word_start - 1;
|
||||
while (isspace(inptr->data[i])) {
|
||||
i--;
|
||||
assert (i >= 0);
|
||||
}
|
||||
}
|
||||
else if (current_x <= last_word_end)
|
||||
i = last_word_end - 1;
|
||||
else
|
||||
i = current_x - 1;
|
||||
|
||||
inptr->data = nrealloc(inptr->data, i + 2);
|
||||
inptr->data[i + 1] = 0;
|
||||
|
|
Loading…
Reference in New Issue