about summary refs log tree commit diff
path: root/Src/hist.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/hist.c')
-rw-r--r--Src/hist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 4a7a0fa58..df4afd0c5 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -2099,6 +2099,10 @@ bufferwords(LinkList list, char *buf, int *index)
     strinbeg(0);
     noaliases = 1;
     do {
+	if (incond)
+	    incond = 1 + (tok != DINBRACK && tok != INPAR &&
+			  tok != DBAR && tok != DAMPER &&
+			  tok != BANG);
 	ctxtlex();
 	if (tok == ENDINPUT || tok == LEXERR)
 	    break;