[Pinfo-devel] r134 - pinfo/branches/cxx/src

Nathanael Nerode neroden-guest at costa.debian.org
Fri Sep 2 05:57:14 UTC 2005


Author: neroden-guest
Date: 2005-09-02 05:57:13 +0000 (Fri, 02 Sep 2005)
New Revision: 134

Modified:
   pinfo/branches/cxx/src/video.cxx
Log:
Fix top-line-not-filled-out bug.



Modified: pinfo/branches/cxx/src/video.cxx
===================================================================
--- pinfo/branches/cxx/src/video.cxx	2005-09-02 05:26:24 UTC (rev 133)
+++ pinfo/branches/cxx/src/video.cxx	2005-09-02 05:57:13 UTC (rev 134)
@@ -45,14 +45,22 @@
 addtopline(const string type, string::size_type column)
 {
 	string strbuf = type;
+	if (strbuf[strbuf.length() - 1] == '\n') {
+		/* This happened and broke the decorative filler */
+		strbuf.resize(strbuf.length() - 1);
+	}
 
 	substitutestring(strbuf,"File:", _("File:"));
 	substitutestring(strbuf, "Node:", _("Node:"));
 	substitutestring(strbuf, "Next:", _("Next:"));
 	substitutestring(strbuf, "Prev:", _("Prev:"));
 	substitutestring(strbuf, "Up:", _("Up:"));
+
 	attrset(topline);
-	mymvhline(0, 0, ' ', maxx);	/* pads line with spaces -- aesthetic */
+
+	/* pads line with spaces -- aesthetic */
+	mymvhline(0, 0, ' ', maxx);
+
 	if (strbuf.length() > column) {
 		string clipped;
 		clipped = strbuf.substr(column, string::npos);




More information about the Pinfo-devel mailing list