From f2fb8c01f4a1d4967abf36c95b25719bcca65e37 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 10 Dec 2017 19:46:54 +0100
Subject: [PATCH] tweaks: remove a superfluous placing of a terminating nul
 byte

The character move has already copied the terminating byte.
And a reallocation to save just one character of memory is
a waste of time.
---
 src/text.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/text.c b/src/text.c
index c9a5a923..ccdd507e 100644
--- a/src/text.c
+++ b/src/text.c
@@ -109,8 +109,6 @@ void do_deletion(undo_type action)
 	charmove(&openfile->current->data[openfile->current_x],
 		&openfile->current->data[openfile->current_x + char_len],
 		line_len - char_len + 1);
-	null_at(&openfile->current->data, openfile->current_x +
-		line_len - char_len);
 
 #ifndef NANO_TINY
 	/* Adjust the mark if it is after the cursor on the current line. */
-- 
GitLab