Skip to content

Commit

Permalink
fix bigtext. whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Aug 6, 2015
1 parent 41a354c commit 72586fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2251,6 +2251,7 @@ above.
For a working example of a blessed telnet server, see
`examples/blessed-telnet.js`.


### Notes


Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/bigtext.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ BigText.prototype.render = function() {
if (mcell == null) break;
if (this.fch && this.fch !== ' ') {
lines[y][x + mx][0] = dattr;
lines[y][x + mx][1] = mcell === 1 ? this.fch : ' ';
lines[y][x + mx][1] = mcell === 1 ? this.fch : this.ch;
} else {
lines[y][x + mx][0] = mcell === 1 ? attr : dattr;
lines[y][x + mx][1] = ' ';
lines[y][x + mx][1] = mcell === 1 ? ' ' : this.ch;
}
}
lines[y].dirty = true;
Expand Down
2 changes: 2 additions & 0 deletions test/widget-bigtext.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ var box = blessed.bigtext({
// width: 'shrink',
border: 'line',
fch: ' ',
ch: '\u2592',
style: {
fg: 'red',
bg: 'blue',
bold: false
}
});
Expand Down

0 comments on commit 72586fa

Please sign in to comment.