source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: When a column contains trailing spaces, calculate the padding
@ 2010-08-20 23:22 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2010-08-20 23:22 UTC (permalink / raw)
  To: source

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-20 23:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-20 23:22 mdocml: When a column contains trailing spaces, calculate the padding schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).