=================================================================== RCS file: /cvs/mandoc/man_term.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -p -r1.94 -r1.95 --- mandoc/man_term.c 2011/01/04 01:23:18 1.94 +++ mandoc/man_term.c 2011/01/11 00:39:00 1.95 @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.94 2011/01/04 01:23:18 schwarze Exp $ */ +/* $Id: man_term.c,v 1.95 2011/01/11 00:39:00 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010, 2011 Ingo Schwarze @@ -396,6 +396,11 @@ pre_in(DECL_ARGS) p->offset += v; else p->offset = v; + + /* Don't let this creep beyond the right margin. */ + + if (p->offset > p->rmargin) + p->offset = p->rmargin; return(0); }