fix terminal monitor not working for wrapped lines

pull/248/head
nightwing 2016-01-25 20:16:58 +04:00
rodzic eb39399a6d
commit 1c4dc45c94
2 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -110,7 +110,7 @@
"c9.ide.run.debug.xdebug": "#a1b39e0ac4",
"c9.ide.save": "#1ab1840513",
"c9.ide.scm": "#ca3c94b84f",
"c9.ide.terminal.monitor": "#a0d1f02991",
"c9.ide.terminal.monitor": "#021b290e91",
"c9.ide.test": "#a282ec1619",
"c9.ide.test.mocha": "#fc053b23d2",
"c9.ide.theme.flat": "#81dadeee55",

Wyświetl plik

@ -301,8 +301,10 @@ Terminal.prototype.scroll = function() {//TODO optimize lines
var row;
if (++this.ybase === Terminal.scrollback) {
this.ybase = this.ybase / 2 | 0;
this.lines = this.lines.slice(-(this.ybase + this.rows) + 1);
var lineCount = this.ybase / 2 | 0;
this.emit("discardOldScrollback", lineCount);
this.ybase -= lineCount;
this.lines = this.lines.slice(lineCount);
}
this.ydisp = this.ybase;