From f915a28d30fc5a11a0daf00629b26e9bae7bf008 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sun, 18 Dec 2016 16:44:39 +0100
Subject: [PATCH] tweaks: don't bother trimming the final newline from a
 position item

It is irrelevant -- the line is discarded as soon as the data has been
extracted.
---
 src/files.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/files.c b/src/files.c
index 86aac711..2be75041 100644
--- a/src/files.c
+++ b/src/files.c
@@ -3191,8 +3191,7 @@ void load_poshistory(void)
 
 	/* Read and parse each line, and store the extracted data. */
 	while ((read = getline(&line, &buf_len, hist)) > 2) {
-	    if (line[read - 1] == '\n')
-		line[--read] = '\0';
+	    /* Decode nulls as newlines. */
 	    unsunder(line, read);
 
 	    lineptr = parse_next_word(line);
-- 
GitLab