summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man_term.c6
-rw-r--r--term.c8
2 files changed, 5 insertions, 9 deletions
diff --git a/man_term.c b/man_term.c
index 1d3d663a..dea8b1dd 100644
--- a/man_term.c
+++ b/man_term.c
@@ -251,7 +251,7 @@ pre_literal(DECL_ARGS)
* indentation has to be set up explicitly.
*/
if (MAN_HP == n->parent->tok && p->rmargin < p->maxrmargin) {
- p->offset = p->rmargin + 1;
+ p->offset = p->rmargin;
p->rmargin = p->maxrmargin;
p->flags &= ~(TERMP_NOBREAK | TERMP_TWOSPACE);
p->flags |= TERMP_NOSPACE;
@@ -469,9 +469,7 @@ pre_HP(DECL_ARGS)
len = (size_t)ival;
one = term_len(p, 1);
- if (len > one)
- len -= one;
- else
+ if (len < one)
len = one;
p->offset = mt->offset;
diff --git a/term.c b/term.c
index 30f2714c..6a8672de 100644
--- a/term.c
+++ b/term.c
@@ -184,14 +184,12 @@ term_flushln(struct termp *p)
if (vend > bp && 0 == jhy && vis > 0) {
vend -= vis;
(*p->endline)(p);
+ p->viscol = 0;
if (TERMP_NOBREAK & p->flags) {
- p->viscol = p->rmargin;
- (*p->advance)(p, p->rmargin);
+ vbl = p->rmargin;
vend += p->rmargin - p->offset;
- } else {
- p->viscol = 0;
+ } else
vbl = p->offset;
- }
/* Remove the p->overstep width. */