source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: properly set the default indentation  such that even pages
@ 2017-06-17  1:27 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2017-06-17  1:27 UTC (permalink / raw)
  To: source

Log Message:
-----------
properly set the default indentation 
such that even pages without any .SH macros get it

Modified Files:
--------------
    mdocml:
        man_term.c

Revision Data
-------------
Index: man_term.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/man_term.c,v
retrieving revision 1.205
retrieving revision 1.206
diff -Lman_term.c -Lman_term.c -u -p -r1.205 -r1.206
--- man_term.c
+++ man_term.c
@@ -141,6 +141,9 @@ terminal_man(void *arg, const struct rof
 	size_t			 save_defindent;
 
 	p = (struct termp *)arg;
+	save_defindent = p->defindent;
+	if (p->synopsisonly == 0 && p->defindent == 0)
+		p->defindent = 7;
 	p->tcol->rmargin = p->maxrmargin = p->defrmargin;
 	term_tab_set(p, NULL);
 	term_tab_set(p, "T");
@@ -167,16 +170,13 @@ terminal_man(void *arg, const struct rof
 			n = n->next;
 		}
 	} else {
-		save_defindent = p->defindent;
-		if (p->defindent == 0)
-			p->defindent = 7;
 		term_begin(p, print_man_head, print_man_foot, &man->meta);
 		p->flags |= TERMP_NOSPACE;
 		if (n != NULL)
 			print_man_nodelist(p, &mt, n, &man->meta);
 		term_end(p);
-		p->defindent = save_defindent;
 	}
+	p->defindent = save_defindent;
 }
 
 /*
--
 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:[~2017-06-17  1:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-17  1:27 mdocml: properly set the default indentation such that even pages 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).