1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 10:01:11 +02:00

17935: beautify bin_whence indentation of () and {} contents.

This commit is contained in:
Clint Adams 2002-11-13 21:09:01 +00:00
parent 054038d8dd
commit e580d5d767
2 changed files with 13 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2002-11-13 Clint Adams <clint@zsh.org>
* 17935: Src/text.c: beautify bin_whence indentation of ()
and {} contents.
2002-11-13 Peter Stephenson <pws@csr.com>
* 17931: Philippe Troin <phil@fifi.org>: Src/init.c: restore

View file

@ -345,27 +345,31 @@ gettext2(Estate state)
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;