Skip to content

Instantly share code, notes, and snippets.

@chjj chjj/gist:9127877
Created Feb 21, 2014

Embed
What would you like to do?
var blessed = require('../')
, screen;
screen = blessed.screen({
dump: __dirname + '/logs/focus-bug.log',
smartCSR: true
});
var lorem = require('fs').readFileSync(__dirname + '/git.diff', 'utf8');
blessed.box({
parent: screen,
left: 'center',
top: 'center',
width: '80%',
height: '80%',
bg: 'green',
border: {
type: 'ascii'
},
content: 'CSR should still work.'
});
var text = blessed.scrollabletext({
parent: screen,
content: lorem,
border: {
type: 'ascii'
},
left: 'center',
top: 'center',
width: '100%',
width: '50%',
height: '50%',
mouse: true,
keys: true,
vi: true
});
text.focus();
setTimeout(function() {
text.hide();
screen.render();
}, 4000);
screen.key('q', function() {
return process.exit(0);
});
screen.render();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.