From 1be8eb3b30fce218798ffe9c5b33db4cf1d0a206 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg <bensberg@telfort.nl> Date: Sun, 17 Sep 2017 12:37:17 +0200 Subject: [PATCH] tweaks: elide an unneeded check When history has changed, not all three listst can be empty. --- src/history.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/history.c b/src/history.c index dda273c9..eea60119 100644 --- a/src/history.c +++ b/src/history.c @@ -401,9 +401,8 @@ void save_history(void) char *searchhist; FILE *hist; - /* If the histories are unchanged or empty, don't bother saving them. */ - if (!history_changed || (searchbot->lineno == 1 && - replacebot->lineno == 1 && executebot->lineno == 1)) + /* If the histories are unchanged, don't bother saving them. */ + if (!history_changed) return; searchhist = histfilename(); -- GitLab