screen.screenshot
This commit is contained in:
parent
963cfbb9f8
commit
3d8dfd0db4
|
@ -2017,9 +2017,9 @@ Screen.prototype._cursorAttr = function(cursor, dattr) {
|
|||
|
||||
Screen.prototype.screenshot = function(xi, xl, yi, yl, term) {
|
||||
if (xi == null) xi = 0;
|
||||
if (xl == null) xl = this.lpos.xl;
|
||||
if (xl == null) xl = this.cols;
|
||||
if (yi == null) yi = 0;
|
||||
if (yl == null) yl = this.lpos.yl;
|
||||
if (yl == null) yl = this.rows;
|
||||
|
||||
var x
|
||||
, y
|
||||
|
|
|
@ -252,6 +252,12 @@ button.on('press', function() {
|
|||
|
||||
screen.append(button);
|
||||
|
||||
screen.key('S-s', function() {
|
||||
stext.wrap = false;
|
||||
stext.setContent(screen.screenshot());
|
||||
screen.render();
|
||||
});
|
||||
|
||||
screen.on('keypress', function(ch, key) {
|
||||
if (key.name === 'tab') {
|
||||
return key.shift
|
||||
|
|
Loading…
Reference in New Issue