From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26122 invoked from network); 13 Nov 2002 21:07:06 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 13 Nov 2002 21:07:06 -0000 Received: (qmail 27515 invoked by alias); 13 Nov 2002 21:06:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17935 Received: (qmail 27506 invoked from network); 13 Nov 2002 21:06:56 -0000 Date: Wed, 13 Nov 2002 16:06:48 -0500 From: Clint Adams To: Oliver Kiddle Cc: zsh-workers@sunsite.dk, 163190-forwarded@bugs.debian.org Subject: Re: Bug#163190: zsh: Bad indentation in displayed shell function (whence -f) Message-ID: <20021113210648.GA16890@dman.com> References: <20021004214600.GA27515@dman.com> <20021025130100.GA1143@logica.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021025130100.GA1143@logica.com> User-Agent: Mutt/1.4i X-Virus-Scanned: by amavisd-milter (http://amavis.org/) > 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;