summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c4
-rw-r--r--src/text.c1
2 files changed, 0 insertions, 5 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 5cdc22b..0b67c88 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -297,10 +297,6 @@ struct text_chunk *copy_region(struct buffer *buffer, struct region region) {
if (curr->allocated) {
free(curr->text);
- curr->text = NULL;
- curr->nbytes = curr->nchars = 0;
- curr->line = 0;
- curr->allocated = false;
}
struct text_chunk txt =
diff --git a/src/text.c b/src/text.c
index 115fb13..2ecd137 100644
--- a/src/text.c
+++ b/src/text.c
@@ -241,7 +241,6 @@ void delete_line(struct text *text, uint32_t line) {
}
--text->nlines;
- free(text->lines[text->nlines].data);
text->lines[text->nlines].data = NULL;
text->lines[text->nlines].nbytes = 0;
text->lines[text->nlines].nchars = 0;