From d18b7996244547b5abedeb273d109cd3a207594a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Breitbart?= Date: Fri, 5 Jul 2019 02:04:42 +0200 Subject: [PATCH] fix HT, HTS, CHT --- src/InputHandler.ts | 6 ++++++ src/Terminal2.test.ts | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/InputHandler.ts b/src/InputHandler.ts index f97e4ba3..18eb9fa6 100644 --- a/src/InputHandler.ts +++ b/src/InputHandler.ts @@ -554,6 +554,9 @@ export class InputHandler extends Disposable implements IInputHandler { * Horizontal Tab (HT) (Ctrl-I). */ public tab(): void { + if (this._terminal.buffer.x >= this._terminal.cols) { + return; + } const originalX = this._terminal.buffer.x; this._terminal.buffer.x = this._terminal.buffer.nextStop(); if (this._terminal.options.screenReaderMode) { @@ -746,6 +749,9 @@ export class InputHandler extends Disposable implements IInputHandler { * Cursor Forward Tabulation Ps tab stops (default = 1) (CHT). */ public cursorForwardTab(params: number[]): void { + if (this._terminal.buffer.x >= this._terminal.cols) { + return; + } let param = params[0] || 1; while (param--) { this._terminal.buffer.x = this._terminal.buffer.nextStop(); diff --git a/src/Terminal2.test.ts b/src/Terminal2.test.ts index 91568c41..6cc6f733 100644 --- a/src/Terminal2.test.ts +++ b/src/Terminal2.test.ts @@ -126,9 +126,9 @@ if (os.platform() !== 'win32') { 't0075-DECSTBM_CUU_CUD.in', 't0076-DECSTBM_IL_DL.in', 't0077-DECSTBM_quirks.in', - 't0080-HT.in', - 't0082-HTS.in', - 't0083-CHT.in', + // 't0080-HT.in', + // 't0082-HTS.in', + // 't0083-CHT.in', 't0084-CBT.in', // 't0090-alt_screen.in', 't0091-alt_screen_ED3.in',