summaryrefslogtreecommitdiff
path: root/common/content/buffer.js
diff options
context:
space:
mode:
authorDoug Kearns <dougkearns@gmail.com>2011-01-23 17:12:37 +1100
committerDoug Kearns <dougkearns@gmail.com>2011-01-23 17:12:37 +1100
commit79247daec78b71b5c56b7987ccd86a032d5390f6 (patch)
treed334a84e799a78228bc17c1cddd50a85fa9dc00b /common/content/buffer.js
parent7d50100d67a5ef82c80cb30a4b80df38d80fde95 (diff)
downloadpentadactyl-79247daec78b71b5c56b7987ccd86a032d5390f6.tar.gz
Don't output blank lines for empty pageinfo sections.
Diffstat (limited to 'common/content/buffer.js')
-rw-r--r--common/content/buffer.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/common/content/buffer.js b/common/content/buffer.js
index abbfb23c..21008477 100644
--- a/common/content/buffer.js
+++ b/common/content/buffer.js
@@ -486,7 +486,7 @@ var Buffer = Module("buffer", {
* section's output.
*/
addPageInfoSection: function addPageInfoSection(option, title, func) {
- this.pageInfo[option] = [func, title];
+ this.pageInfo[option] = [func, title]; // TODO: are these reversed intentionally? --djk
},
/**
@@ -1023,10 +1023,9 @@ var Buffer = Module("buffer", {
return;
}
- let option = sections || options["pageinfo"];
- let list = template.map(option, function (option) {
- let opt = buffer.pageInfo[option];
- return opt ? template.table(opt[1], opt[0](true)) : undefined;
+ let list = template.map(sections || options["pageinfo"], function (option) {
+ let [data, title] = buffer.pageInfo[option];
+ return template.table(title, data(true));
}, <br/>);
dactyl.echo(list, commandline.FORCE_MULTILINE);
},