Created
February 21, 2014 02:48
-
-
Save chjj/9127877 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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