]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Fix index behavior
authorDaniel Imms <daimms@microsoft.com>
Sat, 21 Jan 2017 05:49:39 +0000 (21:49 -0800)
committerDaniel Imms <daimms@microsoft.com>
Sat, 21 Jan 2017 05:49:39 +0000 (21:49 -0800)
Don't wrap cursor to column 0 after an index, fixes 2 tests

src/xterm.js

index 7ab69b8da95c25599d932cd9c9fa3c3fe5e0ad2b..ca5b642e453cc0b0207fc2ad1ad2c3cbfea93ab3 100644 (file)
@@ -2303,6 +2303,9 @@ Terminal.prototype.index = function() {
     this.y--;
     this.scroll();
   }
+  if (this.x >= this.cols) {
+    this.x--;
+  }
 };