1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 10:01:11 +02:00

Don't call histreduceblanks() if the line didn't parse right.

This commit is contained in:
Wayne Davison 2000-10-19 07:12:26 +00:00
parent 7b967b0d51
commit 4be4c7575c

View file

@ -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();
}
if ((isset(HISTIGNOREDUPS) || isset(HISTIGNOREALLDUPS)) && he
&& histstrcmp(chline, he->text) == 0) {
/* This history entry compares the same as the previous.