aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/eqn_term.c
diff options
context:
space:
mode:
Diffstat (limited to 'eqn_term.c')
-rw-r--r--eqn_term.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/eqn_term.c b/eqn_term.c
index 33edf415..e11b0485 100644
--- a/eqn_term.c
+++ b/eqn_term.c
@@ -1,4 +1,4 @@
-/* $Id: eqn_term.c,v 1.10 2017/07/05 15:03:27 schwarze Exp $ */
+/* $Id: eqn_term.c,v 1.11 2017/07/06 00:19:54 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -113,15 +113,6 @@ eqn_box(struct termp *p, const struct eqn_box *bp)
if (bp->font != EQNFONT_NONE)
term_fontpop(p);
- if ((bp->type == EQN_LIST && bp->expectargs > 1) ||
- (bp->type == EQN_PILE && (bp->prev || bp->next)) ||
- (bp->parent != NULL && bp->parent->pos == EQNPOS_SQRT)) {
- p->flags |= TERMP_NOSPACE;
- term_word(p, bp->right != NULL ? bp->right : ")");
- if (bp->parent->type == EQN_SUBEXPR && bp->next != NULL)
- p->flags |= TERMP_NOSPACE;
- }
-
if (bp->top != NULL) {
p->flags |= TERMP_NOSPACE;
term_word(p, bp->top);
@@ -130,4 +121,12 @@ eqn_box(struct termp *p, const struct eqn_box *bp)
p->flags |= TERMP_NOSPACE;
term_word(p, "_");
}
+ if ((bp->type == EQN_LIST && bp->expectargs > 1) ||
+ (bp->type == EQN_PILE && (bp->prev || bp->next)) ||
+ (bp->parent != NULL && bp->parent->pos == EQNPOS_SQRT)) {
+ p->flags |= TERMP_NOSPACE;
+ term_word(p, bp->right != NULL ? bp->right : ")");
+ if (bp->parent->type == EQN_SUBEXPR && bp->next != NULL)
+ p->flags |= TERMP_NOSPACE;
+ }
}