]> git.wh0rd.org Git - nano.git/commitdiff
- nano.c:do_wrap() - Move right increment to part where new line is created, should...
authorChris Allegretta <chrisa@asty.org>
Wed, 16 Jan 2002 00:54:47 +0000 (00:54 +0000)
committerChris Allegretta <chrisa@asty.org>
Wed, 16 Jan 2002 00:54:47 +0000 (00:54 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_1_0_branch/nano@1004 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
nano.c

index f47089cc8631a1918e1855530307277c5ee1ce9c..331bc28e74dd8b145c9ef3593755668f621abd28 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,9 @@ CVS Code -
   do_suspend()
        - Call tcsetattr() to restore the old terminal settings, so
          tcsh can use ^C after suspend for example (fixes BUG #68).
+  do_wrap()
+       - Move "right" increment to part where new line is created,
+         should change (fix?) some wrapping problems with autoindent.
 - search.c:
   findnextstr()
        - Fix off by one in check for wrap around (Rocco Corsi).
diff --git a/nano.c b/nano.c
index 46954b6f2916ffa1a4e9212644b3f97a483e693c..91ea1f9e8c128e5c602bb1c96ea0f6bb143b075b 100644 (file)
--- a/nano.c
+++ b/nano.c
@@ -901,7 +901,6 @@ void do_wrap(filestruct * inptr, char input_char)
                while ((inptr->next->data[i] == ' ' 
                        || inptr->next->data[i] == '\t')) {
                    i++;
-                   right++;
                }                       
            }
            down = 1;
@@ -954,7 +953,6 @@ void do_wrap(filestruct * inptr, char input_char)
                while ((inptr->next->data[i] == ' ' 
                        || inptr->next->data[i] == '\t')) {
                    i++;
-                   right++;
                }                       
            }
 
@@ -1061,6 +1059,7 @@ void do_wrap(filestruct * inptr, char input_char)
                    extra++;
                    spc++;
                    totsize++;
+                   right++;
                }
                t = nmalloc(strlen(temp->data) + extra + 1);
                strncpy(t, inptr->data, extra);