nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 1be8eb3b30fce218798ffe9c5b33db4cf1d0a206
parent fb9c180baea2dda44f925c2a73a5da3e71c3ca8f
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 17 Sep 2017 12:37:17 +0200

tweaks: elide an unneeded check

When history has changed, not all three listst can be empty.

Diffstat:
Msrc/history.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 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();