From 4be4c7575c56432d028ee7a51ac6ba61abd54cee Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 19 Oct 2000 07:12:26 +0000 Subject: Don't call histreduceblanks() if the line didn't parse right. --- Src/hist.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Src/hist.c b/Src/hist.c index 5b32748b5..4d803c0bd 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -1063,11 +1063,12 @@ hend(Eprog prog) } #endif /* get rid of pesky \n which we've already nulled out */ - if (chwordpos > 1 && !chline[chwords[chwordpos-2]]) + if (chwordpos > 1 && !chline[chwords[chwordpos-2]]) { chwordpos -= 2; - /* strip superfluous blanks, if desired */ - if (isset(HISTREDUCEBLANKS)) - histreduceblanks(); + /* strip superfluous blanks, if desired */ + if (isset(HISTREDUCEBLANKS)) + histreduceblanks(); + } if ((isset(HISTIGNOREDUPS) || isset(HISTIGNOREALLDUPS)) && he && histstrcmp(chline, he->text) == 0) { /* This history entry compares the same as the previous. -- cgit 1.4.1