mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-01 21:51:40 +02:00
Don't call histreduceblanks() if the line didn't parse right.
This commit is contained in:
parent
7b967b0d51
commit
4be4c7575c
1 changed files with 5 additions and 4 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue