about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-03-23 04:11:14 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-03-23 04:11:14 +0000
commit477e1b40042a19a00bd9f15e411a036a51405e2f (patch)
tree8d8cb105a9898fd912b69281b17b32b689bce108
parent9f883c9b775c5e60d77bd60f8a3472aaa728e105 (diff)
downloadzsh-477e1b40042a19a00bd9f15e411a036a51405e2f.tar.gz
zsh-477e1b40042a19a00bd9f15e411a036a51405e2f.tar.xz
zsh-477e1b40042a19a00bd9f15e411a036a51405e2f.zip
zsh-workers/10179
-rw-r--r--Src/text.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/Src/text.c b/Src/text.c
index fbc393e26..c148423b8 100644
--- a/Src/text.c
+++ b/Src/text.c
@@ -194,6 +194,9 @@ struct tstack {
 	struct {
 	    int par;
 	} _cond;
+	struct {
+	    Wordcode end;
+	} _subsh;
     } u;
 };
 
@@ -329,8 +332,10 @@ gettext2(Estate state)
 	    if (!s) {
 		taddstr("( ");
 		tindent++;
-		tpush(code, 1);
+		n = tpush(code, 1);
+		n->u._subsh.end = state->pc + WC_SUBSH_SKIP(code);
 	    } else {
+		state->pc = s->u._subsh.end;
 		tindent--;
 		taddstr(" )");
 		stack = 1;
@@ -340,8 +345,10 @@ gettext2(Estate state)
 	    if (!s) {
 		taddstr("{ ");
 		tindent++;
-		tpush(code, 1);
+		n = tpush(code, 1);
+		n->u._subsh.end = state->pc + WC_CURSH_SKIP(code);
 	    } else {
+		state->pc = s->u._subsh.end;
 		tindent--;
 		taddstr(" }");
 		stack = 1;