nano

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

commit 7cf08b93ffb167332d7a57ab3d0a81fcc23c3160
parent 474a1f044777b051e6400fa0e6f6fb422b208688
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Thu, 27 Feb 2020 13:51:56 +0100

tweaks: don't bother reallocating the line data when undoing a line join

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

diff --git a/src/text.c b/src/text.c @@ -570,11 +570,9 @@ void do_undo(void) goto_line_posx(openfile->filebot->lineno, 0); break; } + line->data[u->head_x] = '\0'; intruder = make_new_node(line); intruder->data = copy_of(u->strdata); - data = measured_copy(line->data, u->tail_x); - free(line->data); - line->data = data; splice_node(line, intruder); renumber_from(intruder); goto_line_posx(u->head_lineno, u->head_x);