]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Merge pull request #97 from Tyriar/redundant_resize
authorParis Kasidiaris <pariskasidiaris@gmail.com>
Thu, 9 Jun 2016 07:53:16 +0000 (10:53 +0300)
committerParis Kasidiaris <pariskasidiaris@gmail.com>
Thu, 9 Jun 2016 07:53:16 +0000 (10:53 +0300)
Don't resize when unnecessary

1  2 
src/xterm.js

diff --cc src/xterm.js
index 8093043af6962cdd105c6e539ffb5049c7669a38,fbfcd3dad8613c759fd6c23330adb432086c8dad..b17437cce963a164040f354d89db3fb96a0e11e1
              this.insertRow();
            }
          }
-       } else if (j > y) {
+       } else { // (j > y)
          while (j-- > y) {
            if (this.lines.length > y + this.ybase) {
 -            this.lines.shift();
 +            if (this.y + this.ybase < j) {
 +              // The line is after the cursor, remove it
 +              this.lines.pop();
 +            } else {
 +              // The line is the cursor, push the viewport down
 +              this.ybase++;
 +              this.ydisp++;
 +            }
            }
            if (this.children.length > y) {
              el = this.children.shift();