nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 6595b715d0266ef22d11211c959a62bd4955bb1b
parent 56c1e34e5ad34ab4e61188f321403e12b725c246
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Tue, 26 Apr 2005 17:21:47 +0000

oops; in do_output(), properly allow wrapping when we insert a tab, for
consistency; this is incompatible with Pico, but Pico doesn't wrap
properly when other control characters are on a line, either, so its
behavior with regard to tabs is apparently a bug; besides, we wrap at
all other blank characters, including multibyte ones, so we shouldn't
make an exception for tabs


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2491 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
MChangeLog | 4++--
Msrc/nano.c | 5++---
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -33,8 +33,8 @@ CVS code - unnecessary update, and remove an unneeded clearok(FALSE). (DLR) do_output() - - Fix off-by-one error that allowed wrapping when we inserted a - tab, for Pico compatibility. (DLR) + - Properly allow wrapping when we insert a tab, for consistency. + (DLR) - utils.c: num_of_digits() - Use a size_t instead of an int, and rename to digits(). (DLR) diff --git a/src/nano.c b/src/nano.c @@ -3927,9 +3927,8 @@ void do_output(char *output, size_t output_len, bool allow_cntrls) do_right(FALSE); #ifndef DISABLE_WRAPPING - /* If we're wrapping text and we didn't insert a tab, we need to - * call edit_refresh(). */ - if (!ISSET(NO_WRAP) && output[i - 1] != '\t') { + /* If we're wrapping text, we need to call edit_refresh(). */ + if (!ISSET(NO_WRAP)) { bool do_refresh_save = do_refresh; do_refresh = do_wrap(current);