minor listbar work.

This commit is contained in:
Christopher Jeffrey 2014-01-11 19:32:43 -06:00
parent 401b1a61cd
commit 2c337bb572
2 changed files with 5 additions and 3 deletions

View File

@ -5961,7 +5961,7 @@ Listbar.prototype.render = function() {
redo = true; redo = true;
return; return;
} }
el.width -= ((drawn + el.width) el.width -= ((drawn + el.width + 0) // could be 2 without the autopadding check
- (lpos.xl - lpos.xi - self.iwidth) - (lpos.xl - lpos.xi - self.iwidth)
// XXX WHY? This seems backwards: // XXX WHY? This seems backwards:
+ (self.screen.autoPadding ? 1 : 0)); + (self.screen.autoPadding ? 1 : 0));

View File

@ -1,9 +1,11 @@
var blessed = require('../') var blessed = require('../')
, screen; , screen;
var auto = true;
screen = blessed.screen({ screen = blessed.screen({
dump: __dirname + '/logs/listbar.log', dump: __dirname + '/logs/listbar.log',
autoPadding: true autoPadding: auto
}); });
var box = blessed.box({ var box = blessed.box({
@ -20,7 +22,7 @@ var bar = blessed.listbar({
bottom: 0, bottom: 0,
left: 3, left: 3,
right: 3, right: 3,
height: 3, height: auto ? 'shrink' : 3,
mouse: true, mouse: true,
keys: true, keys: true,
autoCommandKeys: true, autoCommandKeys: true,