Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#163190: zsh: Bad indentation in displayed shell function (whence -f)
- X-seq: zsh-workers 17935
- From: Clint Adams <clint@xxxxxxx>
- To: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- Subject: Re: Bug#163190: zsh: Bad indentation in displayed shell function (whence -f)
- Date: Wed, 13 Nov 2002 16:06:48 -0500
- Cc: zsh-workers@xxxxxxxxxx, 163190-forwarded@xxxxxxxxxxxxxxx
- In-reply-to: <20021025130100.GA1143@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <E17x37s-0005VN-00@ay> <20021004214600.GA27515@xxxxxxxx> <20021025130100.GA1143@xxxxxxxxxx>
> That looks fine. You'd want to do the same for { ... } (WC_CURSH) too of
> course.
Okay, committing this one.
Index: Src/text.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/text.c,v
retrieving revision 1.11
diff -u -r1.11 text.c
--- Src/text.c 7 Jun 2002 14:44:25 -0000 1.11
+++ Src/text.c 13 Nov 2002 21:06:10 -0000
@@ -345,27 +345,31 @@
break;
case WC_SUBSH:
if (!s) {
- taddstr("( ");
+ taddstr("(");
tindent++;
+ taddnl();
n = tpush(code, 1);
n->u._subsh.end = state->pc + WC_SUBSH_SKIP(code);
} else {
state->pc = s->u._subsh.end;
tindent--;
- taddstr(" )");
+ taddnl();
+ taddstr(")");
stack = 1;
}
break;
case WC_CURSH:
if (!s) {
- taddstr("{ ");
+ taddstr("{");
tindent++;
+ taddnl();
n = tpush(code, 1);
n->u._subsh.end = state->pc + WC_CURSH_SKIP(code);
} else {
state->pc = s->u._subsh.end;
tindent--;
- taddstr(" }");
+ taddnl();
+ taddstr("}");
stack = 1;
}
break;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author