diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-14 23:24:17 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-14 23:24:17 +0000 |
commit | ff7404ec88115f451afc869f7330722a3bb3e41e (patch) | |
tree | ae95f711969058cac81ed938895bd934f5503359 /term.c | |
parent | 91f0f16f2181a2ac79aecf7026518b21cf15770f (diff) | |
download | mandoc-ff7404ec88115f451afc869f7330722a3bb3e41e.tar.gz |
implement so-called absolute horizontal motion: \h'|...',
used for example by zoem(1)
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -526,9 +526,14 @@ term_word(struct termp *p, const char *word) p->flags |= (TERMP_NOSPACE | TERMP_NONEWLINE); continue; case ESCAPE_HORIZ: + if (*seq == '|') { + seq++; + uc = -p->col; + } else + uc = 0; if (a2roffsu(seq, &su, SCALE_EM) == NULL) continue; - uc = term_hen(p, &su); + uc += term_hen(p, &su); if (uc > 0) while (uc-- > 0) bufferc(p, ASCII_NBRSP); |