]> 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/trunk/nano@1004 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
nano.c

index 97d4ba832b85b1502935f3e77ccdf3b73edc2b81..ef098661f51dbc32da68a107c8dd22e06ec445c7 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.
 - global.c:
   shorcut_init()
        - Replace hard coded ALT_G and ALT_H values in the replace
diff --git a/nano.c b/nano.c
index 08f081a3ecc398cf14e11f0c64e82dacb3a79e3c..8ccd580d00fcf774852d0e35bd05b64c92362180 100644 (file)
--- a/nano.c
+++ b/nano.c
@@ -1031,7 +1031,6 @@ void do_wrap(filestruct * inptr, char input_char)
                while ((inptr->next->data[i] == ' '
                        || inptr->next->data[i] == '\t')) {
                    i++;
-                   right++;
                }
            }
 #endif
@@ -1102,7 +1101,6 @@ void do_wrap(filestruct * inptr, char input_char)
                while ((inptr->next->data[i] == ' '
                        || inptr->next->data[i] == '\t')) {
                    i++;
-                   right++;
                }
            }
 #endif
@@ -1223,6 +1221,7 @@ void do_wrap(filestruct * inptr, char input_char)
                    extra++;
                    spc++;
                    totsize++;
+                   right++;
                }
                t = charalloc(strlen(temp->data) + extra + 1);
                strncpy(t, inptr->data, extra);