From 7d0b7e47c11a340ce1bb5bec6303583dbd73b106 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 28 Feb 2020 17:02:34 +0100 Subject: [PATCH] undo: use the correct original fusion point when unjoining two lines When a did the join, 'head' and 'tail' are not the same. This fixes https://savannah.gnu.org/bugs/?57916. Bug existed since commit 7cf08b93 from yesterday. --- src/text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text.c b/src/text.c index ad071506..09b7330c 100644 --- a/src/text.c +++ b/src/text.c @@ -556,7 +556,7 @@ void do_undo(void) goto_line_posx(openfile->filebot->lineno, 0); break; } - line->data[u->head_x] = '\0'; + line->data[u->tail_x] = '\0'; intruder = make_new_node(line); intruder->data = copy_of(u->strdata); splice_node(line, intruder);