]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Fix CUB behavior
authorDaniel Imms <daimms@microsoft.com>
Sat, 21 Jan 2017 07:11:22 +0000 (23:11 -0800)
committerDaniel Imms <daimms@microsoft.com>
Sat, 21 Jan 2017 07:11:22 +0000 (23:11 -0800)
Don't wrap cursor to column 0 after a CUB, fixes 3 tests

src/InputHandler.ts

index 8e6949ba4aa05ff77ec211aa9ab5af31ded2957f..6cb0f08c9bde879a8ad65e6f8fa7eab193eba28e 100644 (file)
@@ -246,6 +246,9 @@ export class InputHandler implements IInputHandler {
     if (param < 1) {
       param = 1;
     }
+    if (this._terminal.x >= this._terminal.cols) {
+      this._terminal.x--;
+    }
     this._terminal.x -= param;
     if (this._terminal.x < 0) {
       this._terminal.x = 0;