From: Chris Allegretta Date: Wed, 16 Jan 2002 00:54:47 +0000 (+0000) Subject: - nano.c:do_wrap() - Move right increment to part where new line is created, should... X-Git-Tag: v1.0.8~1 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=17b97a64fe7b2fb1b1aac16f50cc5c0ef704818a;p=nano.git - nano.c:do_wrap() - Move right increment to part where new line is created, should change (fix?) some wrapping problems with autoindent git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_1_0_branch/nano@1004 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index f47089cc..331bc28e 100644 --- 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 46954b6f..91ea1f9e 100644 --- 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);