From 0516da50a5967ca9e5fa9cc53798534b88bae4b5 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Wed, 9 Mar 2011 21:55:36 +0100 Subject: [PATCH] Terminal#print moves to next line if needed --- public/javascripts/terminal.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/javascripts/terminal.js b/public/javascripts/terminal.js index ac4dab6..57495a7 100644 --- a/public/javascripts/terminal.js +++ b/public/javascripts/terminal.js @@ -329,6 +329,11 @@ SP.Terminal.prototype = { text = Utf8.decode(text); for (var i=0; i= this.cols) { + this.cursorLine += 1; + this.cursorCol = 0; + } + this.fill(this.cursorLine, this.cursorCol, 1, text[i]); this.cursorCol = this.cursorCol + 1; }