]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Don't resize when unnecessary
authorDaniel Imms <daimms@microsoft.com>
Thu, 9 Jun 2016 00:38:34 +0000 (17:38 -0700)
committerDaniel Imms <daimms@microsoft.com>
Thu, 9 Jun 2016 00:38:34 +0000 (17:38 -0700)
src/xterm.js

index a0d4fd09ac25d54acc4fbad2ba20da0f6755e932..fbfcd3dad8613c759fd6c23330adb432086c8dad 100644 (file)
         , j
         , ch;
 
+      if (x === this.cols && y === this.rows) {
+        return;
+      }
+
       if (x < 1) x = 1;
       if (y < 1) y = 1;
 
             this.lines[i].push(ch);
           }
         }
-      } else if (j > x) {
+      } else { // (j > x)
         i = this.lines.length;
         while (i--) {
           while (this.lines[i].length > x) {
             this.insertRow();
           }
         }
-      } else if (j > y) {
+      } else { // (j > y)
         while (j-- > y) {
           if (this.lines.length > y + this.ybase) {
             this.lines.shift();