nano

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

commit 326e41d799bea33ff59478a6129fc4401e18f48a
parent 3ce74eb8fec62abb7cbdb49656401ba30473a2eb
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 21 Apr 2019 11:41:54 +0200

tweaks: elide an unneeded intermediate variable

Diffstat:
Msrc/text.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/text.c b/src/text.c @@ -1467,13 +1467,11 @@ bool do_wrap(void) * flag is set, there is a next line, and prepending would not make * the line too long. */ if (prepend_wrap && rest_length + strlenpt(line->next->data) <= wrap_at) { - const char *tail = remainder + move_mbleft(remainder, rest_length); - /* Go to the end of the line. */ openfile->current_x = line_len; /* If the remainder doesn't end in a blank, add a space. */ - if (!is_blank_mbchar(tail)) { + if (!is_blank_mbchar(remainder + move_mbleft(remainder, rest_length))) { #ifndef NANO_TINY add_undo(ADD); #endif