nano

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

commit dae88f8dc7dc20df4249a71b5b529de38df83d46
parent 64d1711a2452e9de8aa4bde05cbfe62190b4bb7b
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat,  2 Dec 2017 17:39:24 +0100

tweaks: remove a superfluous condition

When the WAS_FINAL_LINE flag is relevant (when NO_NEWLINES isn't set),
the only way for 'current' to be equal to 'filebot' is when 'current_x'
is zero.

Diffstat:
Msrc/text.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/text.c b/src/text.c @@ -1277,7 +1277,7 @@ void add_undo(undo_type action) * or we won't be able to restore it later. */ case ADD: /* If a new magic line will be added, an undo should remove it. */ - if (openfile->current == openfile->filebot && openfile->current_x == 0) + if (openfile->current == openfile->filebot) u->xflags = WAS_FINAL_LINE; u->wassize--; break;