From 17b97a64fe7b2fb1b1aac16f50cc5c0ef704818a Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Wed, 16 Jan 2002 00:54:47 +0000 Subject: [PATCH] - 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 --- ChangeLog | 3 +++ nano.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) 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); -- 2.39.5