2014-04-26 10:14:35 +00:00
|
|
|
var fs = require('fs')
|
|
|
|
, blessed = require('../')
|
|
|
|
, screen;
|
|
|
|
|
|
|
|
// {open}xxxx{close} xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
|
|
|
|
// xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx {red-bg}xxxx xxxx xxxx{/red-bg}
|
|
|
|
|
|
|
|
screen = blessed.screen({
|
2015-07-22 02:23:57 +00:00
|
|
|
dump: __dirname + '/logs/nowrap.log',
|
|
|
|
warnings: true
|
2014-04-26 10:14:35 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
var box = blessed.box({
|
|
|
|
parent: screen,
|
|
|
|
width: 60,
|
|
|
|
wrap: false,
|
|
|
|
tags: true,
|
2014-04-26 11:50:34 +00:00
|
|
|
content: fs.readFileSync(__filename, 'utf8')
|
|
|
|
//content: '{red-bg}' + blessed.escape('{{{{{}{bold}x{/bold}}') + '{/red-bg}'
|
|
|
|
// + '\nescaped: {green-fg}{escape}{{{}{{a{bold}b{/bold}c{/escape}{/green-fg}'
|
2014-04-26 10:14:35 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
box.focus();
|
|
|
|
|
|
|
|
screen.key('q', function() {
|
|
|
|
return process.exit(0);
|
|
|
|
});
|
|
|
|
|
|
|
|
screen.render();
|