]> git.wh0rd.org Git - nano.git/commitdiff
Buglet fix for for losing text on wrap current_x < wrapcol
authorChris Allegretta <chrisa@asty.org>
Mon, 19 Jun 2000 21:21:51 +0000 (21:21 +0000)
committerChris Allegretta <chrisa@asty.org>
Mon, 19 Jun 2000 21:21:51 +0000 (21:21 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@34 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

nano.c

diff --git a/nano.c b/nano.c
index 735e692ab62ab83d5c618229dbbc2d799ea37ba6..f6755d0419d71c3bebc48f4ab83d8be69332ffe9 100644 (file)
--- a/nano.c
+++ b/nano.c
@@ -699,15 +699,13 @@ assert (strlenpt(inptr->data) >= fill);
            temp->data = nmalloc(strlen(&inptr->data[current_word_start]) + 1);
             strcpy(temp->data, &inptr->data[current_word_start]);
 
-           if (!isspace(input_char)) {
-               i = current_word_start - 1;
-               while (isspace(inptr->data[i])) {
-                   i--;
-                   assert (i >= 0);
-               }
+           /* Do this in either case, else words after current_x
+               get chopped... */
+           i = current_word_start - 1;
+           while (isspace(inptr->data[i])) {
+               i--;
+               assert (i >= 0);
            }
-           else
-               i = current_x - 1;
 
             inptr->data = nrealloc(inptr->data, i + 2);
             inptr->data[i + 1] = 0;