summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/man_term.c b/man_term.c
index 65e95e9e..379a39ab 100644
--- a/man_term.c
+++ b/man_term.c
@@ -826,7 +826,8 @@ pre_RS(DECL_ARGS)
sz = (size_t)ival;
mt->offset += sz;
- p->offset = mt->offset;
+ p->rmargin = p->maxrmargin;
+ p->offset = mt->offset < p->rmargin ? mt->offset : p->rmargin;
if (++mt->lmarginsz < MAXMARGINS)
mt->lmargincur = mt->lmarginsz;