commit 7d0b7e47c11a340ce1bb5bec6303583dbd73b106
parent 132ed5c8f053eaa8cc70a170bca1fbbe2575477c
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Fri, 28 Feb 2020 17:02:34 +0100
undo: use the correct original fusion point when unjoining two lines
When a <Backspace> 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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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);