aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term_ps.c
diff options
context:
space:
mode:
Diffstat (limited to 'term_ps.c')
-rw-r--r--term_ps.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/term_ps.c b/term_ps.c
index 2cd94c92..374d3d9a 100644
--- a/term_ps.c
+++ b/term_ps.c
@@ -1,7 +1,7 @@
-/* $Id: term_ps.c,v 1.91 2017/11/10 23:42:52 schwarze Exp $ */
+/* $Id: term_ps.c,v 1.92 2020/09/06 14:45:22 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2014,2015,2016,2017,2020 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2017 Marc Espie <espie@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -1252,7 +1252,10 @@ ps_endline(struct termp *p)
ps_closepage(p);
- p->tcol->offset -= p->ti;
+ if ((int)p->tcol->offset > p->ti)
+ p->tcol->offset -= p->ti;
+ else
+ p->tcol->offset = 0;
p->ti = 0;
}