From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o7KNM9kB004237 for ; Fri, 20 Aug 2010 19:22:10 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id o7KNM9nY031936; Fri, 20 Aug 2010 19:22:09 -0400 (EDT) Date: Fri, 20 Aug 2010 19:22:09 -0400 (EDT) Message-Id: <201008202322.o7KNM9nY031936@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: When a column contains trailing spaces, calculate the padding X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- When a column contains trailing spaces, calculate the padding to the start of the next column correctly. Fixing a problem found by jmc@ in sysctl(3), reminded by kettenis@. Modified Files: -------------- mdocml: term.c Revision Data ------------- Index: term.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/term.c,v retrieving revision 1.167 retrieving revision 1.168 diff -Lterm.c -Lterm.c -u -p -r1.167 -r1.168 --- term.c +++ term.c @@ -275,6 +275,12 @@ term_flushln(struct termp *p) vis = vend; } + /* + * If there was trailing white space, it was not printed; + * so reset the cursor position accordingly. + */ + vis -= vbl; + p->col = 0; p->overstep = 0; -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv