diff --git a/src/xterm.js b/src/xterm.js
index <HASH>..<HASH> 100644
--- a/src/xterm.js
+++ b/src/xterm.js
@@ -1915,6 +1915,10 @@ Terminal.prototype.resize = function(x, y) {
     return;
   }
 
+  if (y > this.getOption('scrollback')) {
+    this.setOption('scrollback', y)
+  }
+
   var line
   , el
   , i
Set minimum scrollback value to number of rows if needed on resize