summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'term.c')
-rw-r--r--term.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/term.c b/term.c
index 01d6ed60..97efc3ee 100644
--- a/term.c
+++ b/term.c
@@ -183,6 +183,13 @@ term_flushln(struct termp *p)
ASCII_BREAK == p->buf[j]))
jhy = j;
+ /*
+ * Hyphenation now decided, put back a real
+ * hyphen such that we get the correct width.
+ */
+ if (ASCII_HYPH == p->buf[j])
+ p->buf[j] = '-';
+
vend += (*p->width)(p, p->buf[j]);
}
@@ -248,12 +255,6 @@ term_flushln(struct termp *p)
vbl = 0;
}
- if (ASCII_HYPH == p->buf[i]) {
- (*p->letter)(p, '-');
- p->viscol += (*p->width)(p, '-');
- continue;
- }
-
(*p->letter)(p, p->buf[i]);
if (8 == p->buf[i])
p->viscol -= (*p->width)(p, p->buf[i-1]);