nano

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

commit 4788c5f97d4b47fabfbbeb2e0ff910394140f1f1
parent a5869ba4505908ebedbc7d0ca33e1577253ab6cf
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Thu,  4 Apr 2019 13:54:32 +0200

tweaks: don't bother reallocating the squeezed string, just terminate it

The string will be rewrapped right after, within microseconds.

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

diff --git a/src/text.c b/src/text.c @@ -1761,7 +1761,7 @@ void squeeze(linestruct *line, size_t skip) } if (shrunk > 0) { - null_at(&newdata, to - newdata); + *to = '\0'; free(line->data); line->data = newdata; } else