From aa8151b1157e8486bce7cb08deeb4c78df1d9669 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 8 May 2017 15:34:54 +0000 Subject: Basic implementation of the roff(7) .ti (temporary indent) request. Needed by about four dozen ports (thanks to naddy@ for the research). --- term_ascii.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'term_ascii.c') diff --git a/term_ascii.c b/term_ascii.c index d0afafc4..97041619 100644 --- a/term_ascii.c +++ b/term_ascii.c @@ -1,7 +1,7 @@ -/* $Id: term_ascii.c,v 1.55 2017/05/07 17:31:45 schwarze Exp $ */ +/* $Id: term_ascii.c,v 1.56 2017/05/08 15:34:54 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons - * Copyright (c) 2014, 2015 Ingo Schwarze + * Copyright (c) 2014, 2015, 2017 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -215,6 +215,8 @@ ascii_endline(struct termp *p) { p->line++; + p->offset -= p->ti; + p->ti = 0; putchar('\n'); } @@ -369,6 +371,8 @@ locale_endline(struct termp *p) { p->line++; + p->offset -= p->ti; + p->ti = 0; putwchar(L'\n'); } -- cgit v1.2.3