summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/man_term.c b/man_term.c
index 8394e3e8..29148d65 100644
--- a/man_term.c
+++ b/man_term.c
@@ -397,6 +397,11 @@ pre_in(DECL_ARGS)
else
p->offset = v;
+ /* Don't let this creep beyond the right margin. */
+
+ if (p->offset > p->rmargin)
+ p->offset = p->rmargin;
+
return(0);
}