Fix status context (sync with Madon 1.4.3)
authorMikael Berthe <mikael@lilotux.net>
Fri, 05 May 2017 22:20:47 +0200
changeset 67 c72b15bec8d9
parent 66 43d43c8b53aa
child 68 cb73e3ec0a14
Fix status context (sync with Madon 1.4.3)
printer/plain.go
--- a/printer/plain.go	Thu May 04 21:19:12 2017 +0200
+++ b/printer/plain.go	Fri May 05 22:20:47 2017 +0200
@@ -189,14 +189,14 @@
 }
 
 func (p *PlainPrinter) plainPrintContext(c *madon.Context, w io.Writer, indent string) error {
-	indentedPrint(w, indent, true, false, "Context", "%d relative(s)", len(c.Ancestors)+len(c.Descendents))
+	indentedPrint(w, indent, true, false, "Context", "%d relative(s)", len(c.Ancestors)+len(c.Descendants))
 	if len(c.Ancestors) > 0 {
 		indentedPrint(w, indent, false, false, "Ancestors", "")
 		p.PrintObj(c.Ancestors, w, indent+p.Indent)
 	}
-	if len(c.Descendents) > 0 {
-		indentedPrint(w, indent, false, false, "Descendents", "")
-		p.PrintObj(c.Descendents, w, indent+p.Indent)
+	if len(c.Descendants) > 0 {
+		indentedPrint(w, indent, false, false, "Descendants", "")
+		p.PrintObj(c.Descendants, w, indent+p.Indent)
 	}
 	return nil
 }